title: jQuery mobile tap event triggered for twice
body: <p>I tested with jquery mobile 'tap' event and found it fired <strong>two times</strong>, everytime it is triggered. Code as below for a html page:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Demo&lt;/title&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"&gt;    
      &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"&gt;&lt;/script&gt;    
      &lt;script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.js"&gt;&lt;/script&gt;      
      &lt;style&gt;
          #box{
              background-color:red;
              width:200px;
              height:200px;
          }   
      &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="box"&gt;
          tapped me
      &lt;/div&gt;
      &lt;script type="text/javascript"&gt;
          $(document).ready(function() {
              $('#box').bind('tap',function(event) {
                  alert('why');
              }); 
          });
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>More irony is when I test this over jsfiddle, it only fired the event for <strong>one time</strong>.</p>
  
  <p>Here's the link.
  <a href="http://jsfiddle.net/mochatony/tzQ6D/6/" rel="noreferrer">http://jsfiddle.net/mochatony/tzQ6D/6/</a></p>
  
  <p>After further testing I found out the bug has gone away with placing the javascript at header section.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Demo&lt;/title&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"&gt;    
      &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"&gt;
      &lt;/script&gt;
      &lt;script type="text/javascript" src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.js"&gt;
      &lt;/script&gt;
      &lt;style type="text/css"&gt;
          #box{ background-color:red; width:200px; height:200px; }
      &lt;/style&gt;
      &lt;script type="text/javascript"&gt;
          $(document).ready(function() {
              $('#box').bind('tap', function(event) {
                  alert('halo');
              });
          });
      &lt;/script&gt;        
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="box"&gt;
          tapped me
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I couldn't explained why the placement at the body and header section make this different.</p>