Basic logic question about show() and hide().
When a li is clicked, I have a div that slides in on top of it. I’m trying to make it so when the div that is now visible is clicked, it then hides, but I can’t get it to work?
Fiddle: http://jsfiddle.net/xDg3v/2/
You need to add
e.stopPropagation()to keep the click event from bubbling up to theliand showing thedivagain.Fiddle: http://jsfiddle.net/xDg3v/4/