Return to Snippet

Revision: 17504
at September 8, 2009 05:23 by mauricenaef


Initial Code
	$('.default-value').each(function() {
    	var default_value = this.value;
    	$(this).focus(function() {
        	if(this.value == default_value) {
            	this.value = '';
        }
    });
    $(this).blur(function() {
        if(this.value == '') {
            this.value = default_value;
        }
    });

Initial URL

                                

Initial Description

                                

Initial Title
Clear Input field on focus_js

Initial Tags
textmate, forms, jquery

Initial Language
jQuery