$(this) and

$(this) and in on events binding: what’s the difference?

$(this) is always the dom being bind the event, e.g. in

$('#panel').on('hover', '.thumb-box', function(e) {

$(this) is always the $('.thumb-box') being clicked. is the dom triggering the event–it could be another DOM .trigger('click') ing the event.

Q: What’s the use of the difference?

Could be used to stop click events triggering each other. Check e.event and you’ll know if it’s the guy you wanted who caused the chaos.

Alternatively if you want to tell if the event is triggered or not, the simplest way is to check event.isTrigger.

Or you could pass an object with trigger() if you prefer to.

$('.xx').click(function(e, isTriggered){

$('.checkbox').trigger('click', [true]);