To add a css class to the html element, addClass()
method can be used.
<script language="javascript" type="text/javascript">
$("div").addClass("class2");
</script>
Above code will set the class attribute to "class2" in every “div” element on the web page.
Views: 8710 | Post Order: 26