Question

In jQuery, how to attach a click event handler to an element?


Annonce
Ad

Answer

$("#my-id").on( "click", function() {
	// Do something when my-id is clicked
});


[source]
# ID Query