Jquery edit css using .css()

Ever wanted to edit or color something using jquery ??
Well it's so simple!
We will use the .css() function

Here's the div element which we want to change color to gray:
<div id="togray">Lets change this text color to gray</div>

Now the jquery part:

$('#togray').css('color', gray');


It's so simple right ? Dont forget to share :D

This entry was posted in , , . Bookmark the permalink.

Leave a reply