attr ():
Used to set or get the Class property.
1 <Scripttype= "Text/javascript">2 $(function(){3 //Gets the element class Property value4 varattr= $("Div"). attr ("class");5 //set the Element class Property value6 $("Div"). attr ("class"," One");7 });8 </Script>
AddClass ():
Used to append styles.
1 <Scripttype= "Text/javascript">2 $(function(){3 $("Div"). addclass (" One");4 });5 </Script>
Removeclass ():
Used to remove a style.
1 <Scripttype= "Text/javascript">2 $(function(){3 $("Div"). Removeclass (" One");4 });5 </Script>
Toogleclass ():
Used to toggle between two styles, remove if the style exists, or add if the style does not exist.
1 <Scripttype= "Text/javascript">2 $(function(){3 $("Div"). Toogleclass (" One");4 });5 </Script>
Hasclass ():
Used to determine whether an element has a specified style.
1 <Scripttype= "Text/javascript">2 $(function(){3 $("Div"). Hasclass (" One");4 });5 </Script>
jquery style operations