view 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
line wrap: on
line source
/**
 * Contains some boilerplate code for event handling
 * 
 */
(function($) {
    $.eventsugar = {
            /**
             * Checks if a click is an attempt to open a link in a new tab
             * @param event
             * @returns {Boolean}
             */
            isAttemptToOpenInAnotherWindow: function(event) {
                return 2 === event.which || event.metaKey || event.ctrlKey || event.shiftKey;
        }
    };
})(jQuery);