0

I have a menu system that I got to open and close with a click of the menu. I would like it to also close when you click on another menu or anywhere else on the page for that matter. Here is what I'm looking at.

http://jsfiddle.net/xKloc/WheLg/

I know the solution is simple but I just can't get it to work right. Any help would be appreciated!

Todd Skelton
  • 6,839
  • 3
  • 36
  • 48

1 Answers1

1

Check out this post. It has the solution. Basically you subscribe to the body click event and inside your div you stop click propagation or you set some property to some value.

How do I detect a click outside an element?

Community
  • 1
  • 1
RyanFishman
  • 695
  • 5
  • 13