I need to pass somehow the information about pressed Ctrl key on invoking the event by jQuery click function. I want invoke this with Ctrl key pressed.
$(selector).click();
This is simplified example:
https://jsfiddle.net/62mdur6o/
When you click on the first cell of table ("One") you do not get information about present Ctrl key in the event.
Is it possible to invoke click listener differently or to attach somehow this information to the event which will be passed to other listeners?
You can trigger event using:
$('#cell').click(function (event) {
event.stopPropagation();
var e = jQuery.Event( event, {ctrlKey: event.ctrlKey} );
$(this).next().trigger(e);
});