Jquery click outside

 $(document).mouseup(function (e)

{

    var container = new Array();

    container.push($('#item_1'));

    container.push($('#item_2'));

    

    $.each(container, function(key, value) {

        if (!$(value).is(e.target) // if the target of the click isn't the container...

            && $(value).has(e.target).length === 0) // ... nor a descendant of the container

        {

            $(value).hide();

        }

    });

});

Không có nhận xét nào:

Is it okay to use both fetchpriority="high" and loading="eager" in img tag?

 https://stackoverflow.com/questions/77744344/is-it-okay-to-use-both-fetchpriority-high-and-loading-eager-in-img-tag Yes Fetchpriority and l...