Revision: 45270
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at April 28, 2011 02:18 by xz
Initial Code
(function ($) { // VERTICALLY ALIGN FUNCTION $.fn.vAlign = function() { return this.each(function(i){ var ah = $(this).height(); var ph = $(this).parent().height(); var mh = (ph - ah) / 2; $(this).css('padding-top', mh); }); }; })(jQuery); $('.centered').vAlign();
Initial URL
Initial Description
Initial Title
vertical centering with jQuery
Initial Tags
center
Initial Language
jQuery