jQuery event stopPropagation
The effect of event.stopPropagation is different if the event is an event object or if it is a string with the event name in it. I believe the behaviour for passing the event object is incorrect.
by Danack
HTML
<div id='object1'>Object 1</div>
<div id='object2'>Object 2</div>
JavaScript
var alertCount = 0;
function someFunction(event) {
event.stopPropagation();
alertCount++;
alert("This is alert " + alertCount);
}
$('#object1').on('customEvent', someFunction).addClass('customEventClass');
$('#object2').on('customEvent', someFunction).addClass('customEventClass');
$(".customEventClass").trigger('customEvent');
var event = jQuery.Event('customEvent');
$(".customEventClass").trigger(event);