Created
September 1, 2017 15:51
-
-
Save VasylKyryliuk/79355a0fb3b27ce48b6db422a3f56caf to your computer and use it in GitHub Desktop.
Дія при кліку по любому місці
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).click(function(e){ | |
if ($(e.target).closest("#header-search #search_mini_form").length) return; | |
$('#header-search #search_mini_form').removeClass('active'); | |
e.stopPropagation(); | |
}); | |
АБО | |
$(document).mouseup(function (e) { | |
var container = $(".header-user-block"); | |
var minicartTop = $(".header-minicart"); | |
if (container && minicartTop.has(e.target).length === 0){ | |
$('div#header-account').removeClass('skip-active'); | |
$('a.skip-account').removeClass('skip-active'); | |
$('div#header-cart').removeClass('skip-active'); | |
$('a.skip-cart').removeClass('skip-active'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment