title: HTML Anchor tag redirect link after ajax request
body: <p>I'm trying to write a method to catch user clicks on a site menu, but I want the process to be silent for the user, mainly, that when a user hovers over an anchor tag, it would behave normally (showing the link it contains). I've tried in various ways to do this, and I almost have it working now, my code is as follows:</p>
  
  <pre><code>&lt;div class="selectNode" id="selectNode_1" style="color: rgb(229, 229, 229); background-color: rgb(47, 47, 47); "&gt;
    &lt;a href="http://www.google.com" class="selectAnchor" style="color: rgb(229, 229, 229); "&gt;
      Google
    &lt;/a&gt;
    &lt;img class="childImage" src="icon.png"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And in jQuery, I have:</p>
  
  <pre><code>$(".selectAnchor, .menuAnchor").click(function(event){
      event.stopPropagation();
      console.log(event.target.nodeName);
      //event.preventDefault();
  
      $.ajax({
        type: 'POST',
        url: 'http://localsite/menuRedirect.php',
        data: {id:0, module:'Module',source:'Source'},
        complete: function(data){
          console.log("DONE");
          return true;
        }
      });
  });
  </code></pre>
  
  <p>The link redirects to the selected page, but the ajax code never finishes, thus never registers the user's click.</p>
  
  <p>I tried using event.preventDefault, but there is no way to resume the cancelled event.</p>
  
  <p>Part of the problem comes from extra functionality, say, most users right click on the anchor tag to open in a new tab (or use control + click, or middle click), and using something like </p>
  
  <pre><code>&lt;a href="javascript:saveClick(o)"&gt;Google&lt;/a&gt;
  </code></pre>
  
  <p>is not allowed on the site (for security reasons).</p>
  
  <p>Any suggestions how this can be done? </p>