Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).bind('mouseup touchend', function(e){
- var container = $('.menu');
- if (!container.is(e.target) // if the target of the click isn't the container...
- && container.has(e.target).length === 0) // ... nor a descendant of the container
- {
- container.removeClass('active');
- $('body').removeClass('no-scroll');
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement