Stop event propagation based on http://www.quirksmode.org/js/events_order.html
[infodrom/phone] / lib / basics.js
index 886e103..d548e3d 100644 (file)
@@ -14,6 +14,13 @@ function style_adjust(styles)
     }
 }
 
+function stop_propagation(e)
+{
+    if (!e) var e = window.event;
+    e.cancelBubble = true;
+    if (e.stopPropagation) e.stopPropagation();
+}
+
 /*
  * Small AJAX framework
  */