Sha256: c5222d05b024f6d73cd912f661df86332b582982207316d766e4a2c27bb73fd0
Contents?: true
Size: 732 Bytes
Versions: 12
Compression:
Stored size: 732 Bytes
Contents
jQuery.fn.inputHints=function() { // hides the input display text stored in the title on focus // and sets it on blur if the user hasn't changed it. // show the display text $(this).each(function(i) { $(this).val($(this).attr('title')) .addClass('hint'); }); // hook up the blur & focus return $(this).focus(function() { if ($(this).val() == $(this).attr('title')) $(this).val('').removeClass('hint'); }).blur(function() { if ($(this).val() == '') $(this).val($(this).attr('title')).addClass('hint'); else if ($.browser.msie && $(this).val() != $(this).attr('title')) { $(this).removeClass('hint'); } }); };
Version data entries
12 entries across 12 versions & 1 rubygems