How can I change the text color with jQuery
- By Preneesh AV --
- 12-Dec-2019 --
- 184 Comments
How can I change the text color with jQuery?
Place the following in your jQuery mouseover
event handler:
$(this).css('color','red');
To set both color and size at the same time:
$(this).css({'color':'red','font-size':'150%'});
You can set any CSS attribute using the .css()