html form question
html form question
Out of context: Reply #4
- Started
- Last post
- 22 Responses
- rabbit0
(function( $, window, document, undefined ){
//$(document).ready(function() {
//clears all form values on focus
$.fn.cleardefault = function() {
return this.live("focus", function() {
if( this.value == this.defaultValue ) {
this.value = "";
}
}).live("blur", function() {
if( !this.value.length ) {
this.value = this.defaultValue;
}
});
};
$(".clearit input, .clearit textarea").cleardefault();//alert("test");
//});})( jQuery, window, document );