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

Version Path
rmails-0.2.5 app/assets/javascripts/lib/jquery_input_hint.js
rmails-0.2.4 app/assets/javascripts/lib/jquery_input_hint.js
rmails-0.2.3 app/assets/javascripts/lib/jquery_input_hint.js
rmails-0.2.2 app/assets/javascripts/lib/jquery_input_hint.js
rmails-0.2.1 app/assets/javascripts/lib/jquery_input_hint.js
rmails-0.2.0 app/assets/javascripts/lib/jquery_input_hint.js
rmails-0.1.6 app/assets/javascripts/lib/jquery_input_hint.js
rmails-0.1.5 app/assets/javascripts/lib/jquery_input_hint.js
rmails-0.1.4 app/assets/javascripts/lib/jquery_input_hint.js
rmails-0.1.3 app/assets/javascripts/lib/jquery_input_hint.js
rmails-0.1.2 app/assets/javascripts/lib/jquery_input_hint.js
rmails-0.1.1 app/assets/javascripts/lib/jquery_input_hint.js