How does jQuery event namespace works?

The event.namespace property is used to return the custom namespace when the event was triggered.


You can try to run the following code to learn how event namespace works and how to create and remove namespace −

Live Demo

<!DOCTYPE html>
<script src=""></script>

<p>Click me</p>
<p>Click above to generate an alert box. Click the below button to remove namespace, which won’t generate an alert box.</p>
<button>Click this button to remove namespace.</button>