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:

URL parameters with React Router

 https://ui.dev/react-router-url-parameters If you're reading this, you're probably familiar with the idea of function parameters. T...