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 there a way to chain multiple tailwind css classes on a single hover instance?

 https://stackoverflow.com/questions/73524088/is-there-a-way-to-chain-multiple-tailwind-css-classes-on-a-single-hover-instance There is a wa...