$.fn.smartfield = function( options ) { // default settings var settings = { use: "title" }; // check if options are present before extending the settings if( options ) { $.extend(settings, options); } $(this).each( function() { // -=https://bugzilla.mozilla.org/show_bug.cgi?id=236791=- // $(this).attr('autocomplete','off'); $(this).bind('focus.smartfield', function() { if ( $(this).val() == $(this).attr('title') ) { $(this).val(''); } }); $(this).bind('blur.smartfield', function() { if ($(this).val() == '') { $(this).val( $(this).attr('title') ); } }); }); return this; }