title: Updating JQuery Mobile link/href with JQuery
body: <p>I've hit a frustrating problem and cannot seem to locate a solution to it in conventional searches (apologies if I missed a trick).</p>
  
  <p>I'm using multi-pages and am trying to update the page that a link goes to.</p>
  
  <p>The code:  </p>
  
  <pre><code>&lt;a href="#page_${i+1}" id="theNextButton_${i}" data-role="button" rel="external"&gt;Next&lt;/a&gt;
  
   $("#page_"+counter).attr("ahref", "#page_"+(data.index+1 ))
  </code></pre>
  
  <p>the counter is iterated. <code>data.index+1</code> is the number of the desired page to go. All pages are sequentially numbered with a <code>#page_ prefix</code>.</p>
  
  <p>Looking inside JS Console and inspecting the link I can see that it updates the link correctly but then clicking on the link leads it to do the initial page transition.</p>
  
  <p>Anybody have any recommendations?</p>