jquery center div
jQuery.fn.center = function () { this.css("position", "fixed"); this.css("top", ($(window).height() / 2) - (this.outerHeight() / 2)); this.css("left", ($(window).width() / 2) - (this.outerWidth() / 2)); return this; }
Achievement provides the only real pleasure in life
jQuery.fn.center = function () { this.css("position", "fixed"); this.css("top", ($(window).height() / 2) - (this.outerHeight() / 2)); this.css("left", ($(window).width() / 2) - (this.outerWidth() / 2)); return this; }
Posted by SF at 12:55 am
No comments:
Post a Comment