Created
May 27, 2013 14:49
-
-
Save mribica/5657459 to your computer and use it in GitHub Desktop.
jquery check if click is outside of defined container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).on 'click', (e) -> | |
| target = $(event.target) | |
| unless target.parents().andSelf().is('#container') | |
| $('#container').hide(500) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment