comparison src/DML/MainVisBundle/Resources/assets/lib/jquery.eventsugar/jquery.eventsugar.js @ 0:493bcb69166c

added public content
author Daniel Wolff
date Tue, 09 Feb 2016 20:54:02 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:493bcb69166c
1 /**
2 * Contains some boilerplate code for event handling
3 *
4 */
5 (function($) {
6 $.eventsugar = {
7 /**
8 * Checks if a click is an attempt to open a link in a new tab
9 * @param event
10 * @returns {Boolean}
11 */
12 isAttemptToOpenInAnotherWindow: function(event) {
13 return 2 === event.which || event.metaKey || event.ctrlKey || event.shiftKey;
14 }
15 };
16 })(jQuery);