I have a bind event like:
$(document).on('click', selector, proxy);
what is the difference between "click with mouse" and "do a trigger
XXX.trigger('click');
"
what is their principle in calling callback function?
I have a bind event like:
$(document).on('click', selector, proxy);
what is the difference between "click with mouse" and "do a trigger
XXX.trigger('click');
"
what is their principle in calling callback function?
Both are almost same, but click()
is shorthand of trigger('click')
.
More info here.
I found this info too, in stackoverflow.