jQuery click off element event
Posted
by Nic Hubbard
on Stack Overflow
See other posts from Stack Overflow
or by Nic Hubbard
Published on 2009-09-14T20:15:11Z
Indexed on
2010/04/06
21:13 UTC
Read the original article
Hit count: 238
I have a floating div that gets displayed, and I want it to be hidden when the user clicks off the div. This would be similar to the .hover() funtion callback when hovering off an element. Only I want to do this for click.
I tried just setting a click event for the body, which would hide the div, but that gave unexpected results.
Anyone have ideas on how I could easily do this?
© Stack Overflow or respective owner