所以我看到了这个post并注意到了这个answear
$(document).mouseup(function(e)
{
var container = $("YOUR CONTAINER SELECTOR");
// if the target of the click isn't the container nor a descendant of the container
if (!container.is(e.target) && container.has(e.target).length === 0)
{
container.hide();
}
});
但是,单击后有可能使容器的后代隐藏容器吗?