Return to Snippet

Revision: 35179
at November 4, 2010 00:12 by davebowker


Updated Code
$('input:text, textarea').each(function() {
		if ($(this).val() !== '') {
			$(this).parents('div.c-wrap').find('label').hide();
			//$('body').prepend($(this).val());
		} else {
			//$('body').prepend($(this).val());
		}
	});
	$('input:text, textarea').focus(function() {
		$(this).parents('div.c-wrap').find('label').hide();
	});
	$('input:text, textarea').blur(function() {
		if ($(this).val() == '') {
			$(this).parents('div.c-wrap').find('label').show();
		}
	});

Revision: 35178
at November 3, 2010 22:56 by davebowker


Initial Code
$('input:text, textarea').focus(function() {
		$(this).parents('div.c-wrap').find('label').hide();
	});
	$('input:text, textarea').blur(function() {
		if ($(this).val() == '') {
			$(this).parents('div.c-wrap').find('label').show();
		}
	});

Initial URL


Initial Description


Initial Title
Simple click clear restore form label

Initial Tags
form, jquery

Initial Language
jQuery