The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Trouble with adding/removing a class in Jquery

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #31954

    I am trying to make a navigation menu that when a link is clicked, loads content into a hidden div, then shows the hidden div, then changed the class of the list item. If the same link is clicked again the class reverts back to what it was before and then the content div becomes hidden.

    Here is a url view-source:

    Here is the Jquery



    How can I get this to work?


    I think this might be what you’re looking for:


    That is getting closer. Here is an updated version of how I see it working.

    Now my problem is after clicking links a few times the navigation starts doing strange things.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.