Friday 26 March 2010

How to change CSS using jquery?

<style>
a.red{
color:RED;
}
a.blue{
color:BLUE;
font-weight:bold;
}
</style

<div>
       <a href="javascript:void(0);" class="red">Ashwani Kumar</a>
</div>

$(document).ready(function(){
    $("a").click(function(event)
    {
        $("a").addClass('BLUE');
    }
    )
}
)

Cheers!

No comments:

Post a Comment