Skip Container selector (Click)

$(document).mouseup(function (e) {
        var container = $("Your Container selector");

        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
        {
            jQuery("your selector").removeClass('open');
        }
    });

Comments

Popular posts from this blog

Scroll After Fixed Navigation

Bootstrap CSS Customize with SCSS CSS

Best way to prevent page scrolling on drag (mobile)