How to check whether the event namespace is used in jQuery ? Last Updated : 21 Jun, 2021 Comments Improve Suggest changes Like Article Like Report The jQuery is lightweight, and it has a lot of features like HTML/DOM manipulation, CSS manipulation, HTML event methods, effects and animations, AJAX, utilities. Many multinational companies like Google, IBM, and Microsoft use the jQuery library in their application. The event.namespace property returns the custom namespace when the event was triggered. This property will be used primarily by plugin authors who want to handle tasks differently depending on the event namespace used. Example: Below is the HTML code for determining the event namespace used. HTML <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <script src= "https://code.jquery.com/jquery-3.5.0.js"> </script> </head> <body> <h2 style="color: green">GeeksforGeeks</h2> <button>Click here</button> <div style="height: 10px"></div> <div id="showEventNamespace"></div> <script> // Attach one or more event using .on() method $("#showEventNamespace").on( "test.GeeksForGeeksEventNamespace", function (event) { // event.namespace message is // shown in the div $("#showEventNamespace").show() .html(event.namespace); } ); // On click of the button, the event // namespace is triggered $("button").click(function (event) { $("#showEventNamespace") .trigger("test.GeeksForGeeksEventNamespace"); }); </script> </body> </html> Output: event.namespace Note: The namespace starting with an underscore are reserved for jQuery. Comment More infoAdvertise with us Next Article How to check whether the event namespace is used in jQuery ? K krishna_97 Follow Improve Article Tags : Web Technologies JQuery jQuery-Events jQuery-Methods jQuery-Questions +1 More Similar Reads How to check whether the META key pressed when event is fired using jQuery ? jQuery is a feature-rich JavaScript library. It is a fast and most used JavaScript library. Before using jQuery you must have a basic knowledge of HTML, CSS, and JavaScript. In this article, we will learn about how you can check whether the META key was pressed when the event fired JQuery. META key: 2 min read How to Use jQuery $(this) in Event ? The scope of this keyword changes according to the scope of the object. The $(this) keyword will refer to the selected element to which the event is attached when used in an event. In this article, we will see the implementation of $(this) with an event in different conditions. Syntax:$('element_sel 2 min read How to run a code on mouseenter event in jQuery ? In this article, we will see how to run the code when the mouse enters into the specific area using jQuery. To run the code on a mouse enter a specific area, mouseenter() method is used. The mouseenter() method works when the mouse pointer moves over the selected element. Syntax: $(selector).mouseen 1 min read How to find the parent class name with known class in jQuery ? Given an HTML document and the task is to get the parent class of an element with the help of given class name. Approach 1: The on() method is used to select the event handler for selected elements. It means when the user clicks the button then the function call. The closest() method is used to retu 3 min read How to check element exists or not in jQuery ? Checking if an element exists in jQuery involves selecting the element and verifying its length. If the selected element's length is greater than 0, the element exists in the DOM; otherwise, it doesn't. This is useful for conditionally manipulating elements. There are two ways to check whether an el 3 min read Like