title: how to run a callback function after $.mobile.changePage is ready in jquery?
body: <p>in this project im using jquery and phonegap</p>
  
  <p>i have a link that if clicked , changes the page:</p>
  
  <pre><code>$('#statsButtonmain').on('click', function() {
          $.mobile.changePage("stats.html", { transition: "slideup"}, true, true);  
  });
  </code></pre>
  
  <p>this works fine, but i would like to run a function (<code>playMusic()</code>) when the transition is done, something like this:</p>
  
  <pre><code>$('#statsButtonmain').on('click', function() {
          $.mobile.changePage("stats.html", { transition: "slideup"}, true, true);  
              playMusic();
  });
  </code></pre>
  
  <p>i found out that there is a <code>pageshow</code> event that gets triggered on the page being shown, after its transition completes, but im not sure how to use it</p>
  
  <p>this doesn't seem to work, any ideas?</p>
  
  <p>Thanks</p>