I am a begginer to javascript i don’t know how to do that.I wanna know more details of this concept.
In what context? Where are you seeing this that you don’t understand it?
http://www.kirupa.com/html5/setting_css_styles_using_javascript.htm.
But in my scenario,I want to do from html elements.
you haven’t explained what exactly you want. this may help you.
in case you want to add class “headingclass” to an html element <h1 id="heading">something here </h1>
add class: $(’#heading’).addClass(‘headingclass’);
remove class: $(’#heading’).removeClass(‘headingclass’);