Introduction:
Here I will explain how to use jQuery to close or hide div when user clicks outside of it or Hide/Close div when clicked outside of it using jQuery or how to close open div when click outside of it using jQuery.
Description:
In previous posts I explained jQuery Check internet connection using JavaScript, jQuery Custom Right click Context Menu, jQuery UI Virtual keyboard example, jQuery Show hidden content on mouse over on top of element and many articles relating to jQuery. Now I will explain how to close open div when click outside of it using jQuery.
In previous posts I explained jQuery Check internet connection using JavaScript, jQuery Custom Right click Context Menu, jQuery UI Virtual keyboard example, jQuery Show hidden content on mouse over on top of element and many articles relating to jQuery. Now I will explain how to close open div when click outside of it using jQuery.
If
you want to close open div when click outside of it we need to write the code
like as shown below