Revision: 41302
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at February 16, 2011 01:01 by mattlowden
Initial Code
$('input[type=text]').each(function(){ var target = $(this); if(title = target.attr('title')){ if(target.val().length === 0){ target.val(target.attr('title')); } target.bind('blur', function(){ if(target.val().length === 0){ target.val(target.attr('title')); } }); target.bind('focus', function(){ if(target.val() === target.attr('title')){ target.val(''); } }); } });
Initial URL
Initial Description
Initial Title
HTML Input Prompt
Initial Tags
Initial Language
jQuery