
Jquery Selector is simply a way to select the node from the DOM, the node is nothing but the HTML tag or element. When Browser loads all the different HTML element, it will set up a memory in DOM, JQuery uses the selector which allows into the memory and select the different nodes or elements and do something with that.





In this tutorial, I’m gonna demonstrate you how to track if a click event is being made outside of an HTML element.
Through this example, we are going to close or hide div using Jquery when a click action occurs outside of that element on which the DIV was produced by clicking.
If you have ever found with menus boxes that open on click event, but want them to close when a click event occurs outside of that dom elements.
Here is a simple way to do so.
I’m gonna add an event listener to the document’s body.
When someone clicks it, we look for the event’s targeted id.

