Skip to content
Related Articles
Open in App
Not now

Related Articles

How to check whether the event namespace is used in jQuery ?

Improve Article
Save Article
  • Last Updated : 21 Jun, 2021
Improve Article
Save Article

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.


<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8" />
    <script src=
    <h2 style="color: green">GeeksforGeeks</h2>
    <button>Click here</button>
    <div style="height: 10px"></div>
    <div id="showEventNamespace"></div>
        // Attach one or more event using .on() method
            function (event) {
                // event.namespace message is
                // shown in the div
        // On click of the button, the event
        // namespace is triggered
        $("button").click(function (event) {



Note: The namespace starting with an underscore are reserved for jQuery.

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!