Last active
February 15, 2019 14:02
-
-
Save zdimaz/1b09692c226935e2987d3608bea5cb12 to your computer and use it in GitHub Desktop.
click triger outside
This file contains 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', function(e) { | |
if (!$(e.target).closest(".search-header, .search-header-dropdown").length) { | |
$(".search-header-dropdown").slideUp(); | |
} | |
e.stopPropagation(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment