I have a ul nav. I need to show div content when the “Resources” li is clicked and make “Resources” li active. Then when the div content is clicked to close, hide div content and make li not active. I’m not sure how to go about doing this so any insight would help.
Click this li item, make active:
<li><a href="">Resources</a></li>
Show this div content
<div id="pdftab">Some content</div>
Thanks so much
Without having knowledge of your page markup I can just give you a hint. Something like this would work for you.
Define the active class styles
You can use
addClass/removeClassto add/remove classes from dom elements. Calling.parent()on a jQuery object gets the parent element.Update:
Based on your markup from