Return to Snippet

Revision: 47211
at June 2, 2011 20:40 by thegrevster


Initial Code
var improve = $('.improve'),
	$input = improve.find('input'), 
	specify = "Please specify";

$input
	.val(specify)
	.bind('focus', function() {
		if ($(this).val()===specify){
			$(this).val('');
		}
	})
	.bind('blur', function() {
		if (!$.trim($(this).val())) {
			$(this).val(specify);
		}
	});

Initial URL

                                

Initial Description

                                

Initial Title
jQuery Prepopulated form fields

Initial Tags
form, jquery

Initial Language
jQuery