Wednesday, June 3, 2015

.trigger(""click"); and .click(); are not really the same thing in jQuery.

This suggests that when you do this:

$("#whatever").trigger(""click");

 
 

...you are trying to get an .on event specified upstream in code like so:

$("#whatever").on("click", function() { alert('whatever'); });

 
 

...to fire off.

No comments:

Post a Comment