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 find element with specific ID using 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 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 How to find element with specific ID using jQuery ? The question is to determine whether an element with a specific id exists or not using JQuery. jQuery on() Method: This method adds one or more event handlers for the selected elements and child elements.Syntax: $(selector).on(event, childSelector, data, function, map)Parameters: event: It is requir 3 min read How to Check if Enter Key is Pressed in Textbox JavaScript/jQuery ? Given a textarea element, the task is to check the user presses the enter key with the help of JQuery. jQuery keyup() MethodThis method triggers the keyup event or adds a function to run when a keyup event occurs. The keyup event occurs when a keyboard key is released. Syntax: Trigger the keyup even 2 min read How to check a selector matches some content using jQuery? In order to know whether the jQuery selector selected any element or not, Here 2 methods are discussed and these are mostly used methods. Example-1: In this example, Selector searches for <p> element. This example uses the length property to check If something is selected or not. In this case 2 min read Like