Hey, placeholder is a really useful HTML5 feature but unfortunately not all browsers support it. So here is a small jQuery script that will replicate placeholder functionality for older browsers. Read more for the code.
Archive | jQuery
RSS feed for this sectionSimple jQuery plugin for Vertically Centering
Came across this while needing to vertically center a div within another div: 1234567891011(function ($) { // VERTICALLY ALIGN FUNCTION $.fn.vAlign = function() { return this.each(function(i){ var ah = $(this).height(); var ph = $(this).parent().height(); var mh = Math.ceil((ph-ah) / 2); $(this).css(’margin-top’, mh); }); [...]