title: simple example of gesture in hammerJS
body: <p>i am trying to run simple gesture code  like tap swipe on my browser</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;/script src="https://hammerjs.github.io/dist/hammer.js"&gt;
  &lt;/script&gt;
  &lt;script&gt;
      var myElement = document.getElementById('myElement');
  
      // create a simple instance
      // by default, it only adds horizontal recognizers
      var mc = new Hammer(myElement);
  
      // listen to events...
      mc.on("panleft panright tap press", function(ev) {
          myElement.textContent = ev.type + " gesture detected.";
      });
  &lt;/script&gt;
  
  
  &lt;style type="text/css"&gt;
  #myElement {
      background: black;
      height: 300px;
      text-align: center;
      font: 30px/300px Helvetica, Arial, sans-serif;
  }
  &lt;/style&gt;
  
  
  &lt;/head&gt;
  &lt;body&gt;
  
  
      &lt;div id="myElement"&gt;&lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>i am trying to execute this code but this is showing error
  Cannot read property 'addEventListener' of null </p>