Possible Duplicate:
How do I add a class to a given element?
I’d like to have JavaScript add a class to my h1 elements automatically.
How would I add JavaScript to replace the h1 element with h1="classs" etc?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Using Jquery it’s simple. Loop all of the h1 elements adding the classname to it
Or if you want to add a class per specific element ID