title: How to link Internal Pages in Jquery mobile?
body: <p>What to do if i want to link two internal pages on the click of a button using jquery or javascript...
  i can do it using <code>&lt;a href=#nextPage"&gt;</code> in HTML but i want a script to do it! what i am doing right now is:</p>
  
  <pre><code>&lt;!-- first page--&gt;
  &lt;div data-role="page" id="firstPage"&gt;
  &lt;div data-role="header"&gt; 
  &lt;h1&gt;Test page&lt;/h1&gt;
  &lt;/div&gt;
  &lt;div data-role="content"&gt;
  &lt;p&gt;this page will link internal pages using # &lt;/p&gt;
  &lt;a href="#nextPage" data-role="button"&gt;change to next page&lt;/a&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;!-- second page--&gt;
  &lt;div data-role="page" id="nextPage"&gt;
  &lt;div data-role="header"&gt; 
  &lt;h1&gt;Test page 2 &lt;/h1&gt;
  &lt;/div&gt;
  &lt;div data-role="content"&gt;
  &lt;p&gt;this page will  appear after you click the button on first page. &lt;/p&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>this is doing good, but what i need is a script to link them. as in my app i need to change the page on click of button only after certain conditions met. but i dont know how to do it...</p>
  
  <p>-----------Edit------------
  I found out a way
  window.location.href="#nextPage"
  this is how its done. 
  Thanks all for your effort..</p>