title: Why I have to put all the script to index.html in jquery mobile
body: <p>I have used $.mobile.changepage to do the redirect in my phonegap+jquerymobile projects. However what makes me confused is that I need to put the script of all the pages to the same file index.html. If not, the redirect page can not execute the function in its header.</p>
  
  <p>for example, my index.html seem to be 
  <code>$(document).bind("deviceready",function(){$.mobile.changepage("test.html");})</code></p>
  
  <p>then, my device will redirect to test.html which seem to be</p>
  
  <pre><code>$("#btnTest").click(function(){alert("123");})
  &lt;button id="btnTest"&gt;Test&lt;/button&gt;
  </code></pre>
  
  <p>However, the script will never execute in test.html. Then I put the script to index.html, what I expect to be is done. Whatever, if I put all the script to the same page, the project will become harder and harder to be preserved. Appreciated for your help.</p>