阅读背景:

for循环检查单击了哪个div

来源:互联网 

I got a function like that

我有这样的功能

$(document).mouseup(function (e)
{
    var container = $("#id1");
    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.fadeOut();
    }

    var container2 = $("#id2");
    if (!container2.is(e.target) // if the target of the click isn't the container...
        && container2.has(e.target).length === 0) // ... nor a descendant of the container
    {
        container2.fadeOut();
    }
}
$(docume



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: