   (if-let [tooltip-id (evt->tt-num js-evt)]
     (hide-el! tooltip-id)))
 
-(defn- on-touchstart [js-evt]
-  nil
-  )
+(defn- on-touchend-body [js-evt]
+  (hide-all-tooltips!))
+
+(defn- on-touchend-icon [js-evt]
+  (.stopPropagation js-evt)
+  (if-let [tooltip-id (evt->tt-num js-evt)]
+    (show-tooltip! (aget js-evt "currentTarget") tooltip-id)))
 
 ;;------------------------------------------------------------------------------
 ;; Init and Events

      (remove-pin! tooltip-id)
      (pin-down! tooltip-id))))

;; NOTE: this value needs to stay in sync with the .tooltip-53ddee class
;; in /less/main.less
(def max-tooltip-width 360)

(defn- on-mouseenter [js-evt]
  (when-let [tooltip-id (evt->tt-num js-evt)]
    (let [$target-el ($ (aget js-evt "currentTarget"))
          target-height (.height $target-el)
          target-width (.width $target-el)
          target-coords (.offset $target-el)
          target-x (+ (aget target-coords "left") (/ target-width 2))
          target-y (+ (aget target-coords "top") (/ target-height 2))
          browser-width (.width ($ js/window))
          $tooltip-el ($ (str "#" tooltip-id))
          tooltip-width (.width $tooltip-el)
          flip? (> (+ target-x max-tooltip-width 50) browser-width)]
      (.removeClass $tooltip-el "left-arr-42ea1 right-arr-d3345")
      (if flip?
        (.addClass $tooltip-el "right-arr-d3345")
        (.addClass $tooltip-el "left-arr-42ea1"))
      (.css $tooltip-el (js-obj
        "display" ""
        "left" target-x
        "marginLeft" (if flip? (- 0 tooltip-width 30) 18)
        "top" target-y )))))

;; TODO: IE fires the mouseleave event while the mouse cursor is still inside
;; the tooltip icon, causing a very distracting flicker effect.


(defn- add-touch-events! []
  (doto ($ "body")
    (.on "touchend" on-touchend-body)
    (.on "touchend" tt-link-sel on-touchend-icon)))

(defn init!
  "Initialize tooltip events."
