florynth Posted July 3, 2006 Share Posted July 3, 2006 I did check around but I didn't find it, I want to to change the class of a element when something append, since there's a lot of attribute and I'll probably change them often I want to set the .class1 and .class2 in a CSS file but I want the js script to change it ...Is there a way ?Thanks Link to comment Share on other sites More sharing options...
skym Posted July 3, 2006 Share Posted July 3, 2006 http://w3schools.invisionzone.com/index.ph...c=4769&hl=class Link to comment Share on other sites More sharing options...
aspnetguy Posted July 4, 2006 Share Posted July 4, 2006 elementObject.className = 'newClass'; This is the basic syntax for changing a class name. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now