Difference between revisions of "User:Trias/common.js"

From SpiralKnights

Jump to: navigation, search
(Created page with 'window.killEvt = function( evt ) { evt = evt || window.event || window.Event; // W3C, IE, Netscape if ( typeof ( evt.preventDefault ) != 'undefined' ) { evt.preventDefault();…')
 
(clear)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
window.killEvt = function( evt ) {
+
 
evt = evt || window.event || window.Event; // W3C, IE, Netscape
+
if ( typeof ( evt.preventDefault ) != 'undefined' ) {
+
evt.preventDefault(); // Don't follow the link
+
evt.stopPropagation();
+
} else {
+
evt.cancelBubble = true; // IE
+
}
+
return false; // Don't follow the link (IE)
+
}
+

Latest revision as of 09:43, 24 August 2011


Personal tools