jasonglisson
3/12/2015 - 5:56 PM

Javascript - Make form labels the placeholder text and hide them

Javascript - Make form labels the placeholder text and hide them

$('.form-item').each(function(){
	var label = $(this).find('label').text(); 
	$(this).find('label').hide();
	$(this).find('input[type=text], input[type=email]').each(function(){
		$(this).attr('placeholder', label);
	});
});