I have an input tag of the following form
<input type="text" name="firstname" id="firstname" placeholder="First name">
First I check that the field is not empty using jquery
$("#submitreg").click(function(e){
if ($.trim($("#firstname").val())=='')
{
$("#firstname").attr('placeholder',"first name can't be empty");
e.preventDefault();
}
});
Now if the input field is empty, I change the placeholder to "first name can't be empty". Is it also possible to change the placeholder color to red and make the font 85% using jquery.
Thanks