title: Cannot read property 'href' of undefined when clicking inactive link a second time
body: <p>I get Uncaught TypeError: Cannot read property 'href' of undefined
  when I click the link a second time. Any thoughts why? It happens on line: var x = $(e.target).atributes.href.value;
  And of the course the subsequent redirect doesnt work. Help much appreciated</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  &lt;link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css"&gt;
  &lt;script src="https://code.jquery.com/jquery-1.11.3.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  
  
  $(document).tap(function (e) {
          $('.pq').css("background-color", "white");
  
           if ($(e.target).hasClass("tappedonce")) {
          alert("tappedtwice");
                  var x = $(e.target).attributes.href.value;
                  alert(x);
                  window.location.href = x;
              }
              else {
                  $(e.target).addClass("tappedonce");
                  alert("tappedonce");
              }
  
  
        //  if ($(e.target).hasClass("pq")) {
          //        $(e.target).css("background-color", "red");
            //  }
      });
  
  
   $(document).ready(function () {
  
          $('.pq').addClass("not-active");
      });
  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  
  
  &lt;a href="https://www.sit.com" class="pq"&gt;
  paragraph1
  &lt;/a&gt;
  &lt;a href="https://www.sit2.com" class="pq"&gt;
  paragraph2
  &lt;/a&gt;
  &lt;a href="https://www.sit3.com" class="pq"&gt;
  paragraph3
  &lt;/a&gt;
  
  
  
  
  
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  
  
  &lt;style&gt;
      .not-active {
          pointer-events: none;
          cursor: default;
      }
  &lt;/style&gt;
  </code></pre>