Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

dropdown hide

$('body').on('click', function (e) {
 if (!$('a.dropdown').is(e.target) && $('a.dropdown').has(e.target).length === 0 && $('.open').has(e.target).length === 0 ) { 
$('a.dropdown').parent().removeClass('open'); } });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dropdown #hide
ADD COMMENT
Topic
Name
3+1 =