Update Input Placeholder with jQuery

Ideal for working with plugins where the fields are not available for editing / customization.

jQuery('form').find(".cleanlogin-field-username, .cleanlogin-field-email").each(function(ev) {
		if(!jQuery(this).val()) { 
			jQuery(this).attr("placeholder", "Email Address");
		}
	});

Source.

Leave a Reply

katherine as a flat graphic icon

About Me

I’m an African / Ojibwe First Nations Web Developer living in Winnipeg, Manitoba.

Visit the Tips and Blog to see what I’m working on.