Created
July 15, 2019 09:32
-
-
Save karamanskiy/5b5dc6e1d2f933ed5a034b3a0ad4868d to your computer and use it in GitHub Desktop.
Клик вне элемента
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).mouseup(function (e) { | |
let el = $(".leftmenu"); | |
if (el.has(e.target).length === 0){ | |
el.removeClass('active'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment