(function($){ $.fn.extend({ absolutize: function() { return this.each(function() { var offset = $(this).position(); var height = $(this).height(); var width = $(this).width(); $(this). css('position','absolute') .css('top',offset.top) .css('left',offset.left) .css('width',width) .css('height',height) ; }); } }); })(jQuery);