How do I handle a click anywhere in the page, even when a certain element stops the propagation?

后端 未结 8 1793
臣服心动
臣服心动 2020-12-04 23:51

We are working on a JavaScript tool that has older code in it, so we cannot re-write the whole tool.

Now, a menu was added position fixed to the bottom and the clien

8条回答
  •  醉梦人生
    2020-12-05 00:15

    You could use jQuery to add an event listener on the document DOM.

        $(document).on("click", function () {
            console.log('clicked');
        });

提交回复
热议问题