- This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
Viewing 10 posts - 1 through 10 (of 10 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Instances for jquery addClass() to not work.
In what situations will jquery addClass() property not work? what makes it not work?
Java script not being enabled.
@Paulie_D -_-
Well im trying to get this button to add a class but its not working. Any idea why? http://codepen.io/Jarolin/pen/npECh
what it is supposed to do? change background color? it works for me
@alenAbdula The body background color works fine. But the button switch is suppose to change its gradient. But thats not working.
There’s a mix of ids and classes. Make “switch” in the CSS and HTML a class and it works. But you need “toggleClass” rather than just add because it adds it but doesn’t return it to the original position.
@Boogiesox i did what you said and its working great. Thank you.
It’s because you’re using ID’s http://codepen.io/anon/pen/aelzr
@AlenAbdula Thanks for the help i fixed it :). Can you delete that pen? kinda making that already :P
.