dextra/holy — Issue #1: change centralizer jqueyr.holycomponents.js
Author: brunobincoletto
Created: 2011-11-21 22:04:01+00:00
State: open

(function($) {
// CENTRALIZE FUNCTION - Use this to center absolute box in the browser
jQuery.fn.center = function() {
this.css("position", "absolute");
this.css("top", ($(window).height() - this.height() ) / 2.5 + $(window).scrollTop() + "px");
this.css("left", ($(window).width() - this.width() ) / 2 + $(window).scrollLeft() + "px");
return this;
}
})(jQuery);