Tuesday, 27 August 2013

Jquery: Hiding the closest element

Jquery: Hiding the closest element

I have some jquery to hide content on an index page.
the commented out code in the fiddle is what i have at the moment - but it
hides all content divs if any toggle link is clicked.
I want only the class immediately following the toggle link to be
hidden/shown, but can't get it working. Have tried using parents, nextAll,
and various other methods from similar examples I've found on SO, but so
far nothing has worked.

No comments:

Post a Comment