title: Zepto Mobile Framework - Events in Browser
body: <p>At the moment I am testing this Zepto Mobile Javascript framework.</p>
  
  <p>I downloaded the examples but strangely enough I am noticing that on chrome desktop browser, when clicking on the item that triggers a sub menu (by a webkit slide effect) is not working.</p>
  
  <p>I uploaded the same files on my hosting server and tested out the same page on my iphone it works perfectly fine.</p>
  
  <p>I checked the code and noticed that Zepto is doing binding of a touchstart event where I think it does not work on a desktop browser.</p>
  
  <pre><code>$(document).ready(function(){
  $(document.body).bind('touchstart', function(e){
    var now = Date.now(), delta = now - (touch.last || now);
    touch.target = parentIfText(e.touches[0].target);
    touchTimeout &amp;&amp; clearTimeout(touchTimeout);
    touch.x1 = e.touches[0].pageX;
    touch.y1 = e.touches[0].pageY;
    if (delta &gt; 0 &amp;&amp; delta &lt;= 250) touch.isDoubleTap = true;
    touch.last = now;
  }).bind('touchmove', function(e){
    touch.x2 = e.touches[0].pageX;
    touch.y2 = e.touches[0].pageY;
  }).bind('touchend', function(e){
    if (touch.isDoubleTap) {
      $(touch.target).trigger('doubleTap');
      touch = {};
    } else if (touch.x2 &gt; 0 || touch.y2 &gt; 0) {
      (Math.abs(touch.x1 - touch.x2) &gt; 30 || Math.abs(touch.y1 - touch.y2) &gt; 30)  &amp;&amp;
        $(touch.target).trigger('swipe') &amp;&amp;
        $(touch.target).trigger('swipe' + (swipeDirection(touch.x1, touch.x2, touch.y1,     touch.y2)));
      touch.x1 = touch.x2 = touch.y1 = touch.y2 = touch.last = 0;
    } else if ('last' in touch) {
      touchTimeout = setTimeout(function(){
        touchTimeout = null;
        $(touch.target).trigger('tap')
        touch = {};
      }, 250);
    }
  });
    });
  </code></pre>
  
  <p>Does anyone tested Zepto (Iphone Example) on Chrome/Safari and he can managed to access the submenu?</p>
  
  <p>This is the example URL - <a href="https://github.com/madrobby/zepto/blob/master/examples/iphone/index.html" rel="nofollow">https://github.com/madrobby/zepto/blob/master/examples/iphone/index.html</a></p>
  
  <p>Zepto Demo Package URL - 
  <a href="https://github.com/madrobby/zepto" rel="nofollow">https://github.com/madrobby/zepto</a></p>
  
  <p>Thanks</p>