I am trying to color the text Enter Valid Email in Red how can i achieve this Please Help
email_validation.js
$('#email').focusin(function()
{
$('#email_feed').text('Enter Valid Email...');
})
I am trying to color the text Enter Valid Email in Red how can i achieve this Please Help
email_validation.js
$('#email').focusin(function()
{
$('#email_feed').text('Enter Valid Email...');
})
$('#email').focusin(function()
{
$('#email_feed').html('<span style="color:red;">Enter Valid Email...</span>');
})
Use .css
property
$('#email_feed').text('Enter Valid Email...').css('color','red');
You can either use css
#email_feed
{
color: #F00;
}
Or you could continue using jquery and use
$('#email_feed').text('Enter Valid Email...').css({ color : "#F00" )};
Both will achieve the same result