jQuery On click function

a single handler for all elements that match your selector, including the ones created dynamically.
If you add a handler with .on(“click”, handler) you normally remove it with .off(“click”, handler) which will remove that very handler. Obviously this works only if you have a reference to the function

on Click event with jQuery

$(document).on('click', '#selector', function(){
	#do your code

The jQuery click event.

Was this post helpful?
Let us know if you liked the post. That’s the only way we can improve.
Harinder Singh

Harinder Singh

My name is Harinder Singh and I specialize in Software industry. I consider myself as a life learner. I love learning new concepts, embracing new ideas and reading and searching for innovation.