Mercurial > hg > dml-open-vis
annotate src/DML/MainVisBundle/Resources/assets/lib/jquery.eventsugar/jquery.eventsugar.js @ 1:f38015048f48 tip
Added GPL
author | Daniel Wolff |
---|---|
date | Sat, 13 Feb 2016 20:43:38 +0100 |
parents | 493bcb69166c |
children |
rev | line source |
---|---|
Daniel@0 | 1 /** |
Daniel@0 | 2 * Contains some boilerplate code for event handling |
Daniel@0 | 3 * |
Daniel@0 | 4 */ |
Daniel@0 | 5 (function($) { |
Daniel@0 | 6 $.eventsugar = { |
Daniel@0 | 7 /** |
Daniel@0 | 8 * Checks if a click is an attempt to open a link in a new tab |
Daniel@0 | 9 * @param event |
Daniel@0 | 10 * @returns {Boolean} |
Daniel@0 | 11 */ |
Daniel@0 | 12 isAttemptToOpenInAnotherWindow: function(event) { |
Daniel@0 | 13 return 2 === event.which || event.metaKey || event.ctrlKey || event.shiftKey; |
Daniel@0 | 14 } |
Daniel@0 | 15 }; |
Daniel@0 | 16 })(jQuery); |