title: jQuery page on/live/bind pageinit, pageshow
body: <p>I'm working on application with jQuery mobile, I'm trying to put all the pages in userpanel into one big file and run it by one big .js file. What I don't know is if I can write my .js file in this way:</p>
  
  <p>to initialize when userpanel is loaded</p>
  
  <pre><code>$(document).on('pageinit', function(){
  
  });
  </code></pre>
  
  <p>and than when certain page will be called by id if I can put this:</p>
  
  <pre><code>$("#userpanel").on('pageshow', function(){
  
  });
  </code></pre>
  
  <p>inside the first one like this for each and every page:</p>
  
  <pre><code>$(document).on('pageinit', function(){
  
      $("#userpanel").on('pageshow', function(){
  
      });
  
      $("#*********").on('pageshow', function(){
  
      });
  
      $("#*********").on('pageshow', function(){
  
      });
  
  });
  </code></pre>
  
  <p>And so on, is this how it works or do I misunderstand basic concept of jQuery/JS? If yes what is a good way?</p>