title: Disable href property using jquery
body: <p>I want to disable the <code>a</code> link from refreshing the page (i.e. going to the href link). But I want to the url to be modified, as per the <code>href</code> value.</p>
  
  <p>Currently, I am trying this</p>
  
  <pre><code>$('.advertPP').click(function() {
      event.preventDefault();
      location.href = link.attr("href");
  });
  </code></pre>
  
  <p>HTML Link</p>
  
  <pre><code>&lt;a href="products?id=&lt;?php echo $item_id; ?&gt;" class="advertPP"&gt;Link&lt;/a&gt;
  </code></pre>
  
  <p>Since both are on the same page, so I don't want the page to be refreshed but i want the url to be modified as in the href value.</p>