view 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
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);