title: How to redirect page to href link on click without page load using jQuery
body: <p>I am trying to redirect my php page to another php page without page load.</p>
  
  <p>And these jQuery methods i have tried</p>
  
  <p>1.This returns me alert but not redirecting to the page</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;script type="text/javascript"&gt;
    
  $('a').click(function (event) 
  { 
     event.preventDefault(); 
  
     var url = $(this).attr('href');
   
     $.get(url, function(data) {
       alert(data);
  
      });
  
   });
  &lt;/script&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
   &lt;title&gt;AJax&lt;/title&gt;
   &lt;script
    src="https://code.jquery.com/jquery-3.4.1.min.js"
    integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
    crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  
  &lt;a href="http://localhost:8001/Test/redirect.php"&gt;&lt;h1&gt;Click Here&lt;/h1&gt;&lt;/a&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>2.This method is redirecting to the page but its getting load</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$('a').click(function (event) 
  { 
     event.preventDefault(); 
  
     var url = $(this).attr('href');
     $.get(url, function(data) {
  window.location.href="http://localhost:8001/Test/redirect.php"
      });
  
   });</code></pre>
  </div>
  </div>
  </p>
  
  <p>I want a simple solution to redirect my page without getting load using jQuery and AJAX.
  Guide me to achive this :)</p>