Add/Remove CSS Class to any element using JQuery

Posted by Virendradugar under jQuery category on | Views : 6412
Below code will apply the CSS class to a tag element using JQuery. You can download the Jquery from

 <style type="text/css">
color: Red;
font-weight: bold;

<script type="text/javascript" src="Script/jquery-1.3.2.js"></script>

<script type="text/javascript">

Here is a tag with hypDotnetFunda ID.

<a id="hypDotnetFunda" href="">DotnetFunda</a>

Same way you can also remove the class using removeClass() method.

<script type="text/javascript">


Comments or Responses

Login to post response