In what situations will jquery addClass() property not work? what makes it not work?
Java script not being enabled.
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
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".