- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 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 › jquery toggle
I am working on this jquery toggle script. I got it working in js fiddle
but for some reason, it won’t work on my site. I am not sure I have the correct jquery running. I am setting up a tabbed widget which works, pagination which works, twitter, which works but it seems like I need many different jquery scripts to run them. is there one that runs them all. This is what I have in my head now
pagination stops working if I remove this one
//tabs stop working if I remove this one
I would like one that runs them all. on the jquery site. They say to run this one
I tried it but didn’t work.
Seem like you are using some fairly outdated scripts that won’t work with the latest version of jQuery :(
Also, you could try using something like this, that will be a little more robust (it will work no matter how many toggles you have on the page): http://jsfiddle.net/joshnh/CX8Fh/
How familiar are you with using your browsers console? Whenever I’m having JS problems, that’s the first place I start.
The easiest way would be to change .addClass
to .toggleClass
: http://jsfiddle.net/joshnh/CX8Fh/
No worries. Glad I could help!