Using JQuery, how can I work out if one of the a tags in my div with the id of “nav” was selected so that I can clear out the contents of my other div named “body-wrapper”? I am doing this so that I can change the contents of the div depending on the selection in the navigation menu.
My code can be found here: http://jsfiddle.net/Qvjnc/
Thanks in advanced.
I would just have a click event that clears out the content to start and then inserts the content you want. Example:
UPDATE:
To display different content based on the item clicked change it to something like this:
you would have to give your anchors ids in this example.