Return to Snippet

Revision: 47172
at June 1, 2011 21:20 by erikportin


Initial Code
$(function() {
	
$("#emaillist input[type='text']").attr( 'value', 'enter email' );
	
$("#emaillist input[type='text']").focus(function () {
	var value = $("#emaillist input[type='text']").attr( 'value');
	if (value == 'enter email'){
	$(this).addClass('black');	
	$("#emaillist input[type='text']").attr( 'value', '' );
	}
    });
	
$("#emaillist input[type='text']").focusout(function () {
	var value = $("#emaillist input[type='text']").attr( 'value');
	if (value == '' || value == 'enter email'){
	$(this).removeClass('black');		
	$("#emaillist input[type='text']").attr( 'value', 'enter email' );
	}
    });	
	
});

Initial URL

                                

Initial Description

                                

Initial Title
jquery placeholder for forms in IE

Initial Tags
ie, jquery

Initial Language
JavaScript