If you want to get the click event for outside of some specific Div or area, than a simple solution for the situation is:

$(document).mouseup(function (e)
    var container = $("YOUR SELECTOR"); // Give you class or ID

    if (!container.is(e.target) &&            // If the target of the click is not the desired div or section
        container.has(e.target).length === 0) // ... nor a descendant-child of the container

The above script will hide the div if outside of the div click event is triggered.

There are currently no comments.