title: How to use pageinit correctly?
body: <p>I have a single file for each page and i am trying to implement the pageinit event handler on every page (I think what belongs strictly to one page, should be declared there) as shown below:    </p>
  
  <pre><code>&lt;body&gt;
      &lt;div id="myPage" data-role="page"&gt;
          &lt;!-- Content here --&gt;
          &lt;script type="text/javascript"&gt;
              $("#myPage").live('pageinit', function() {
                  // do something here...
              });
          &lt;/script&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>The event is bound properly to the page, so the code is executed but - now my problem - if i go to another page and return later on the pageinit event will be executed twice. I think that is because the .live method binds the pageinit event again to the page. But shouldn't the pageinit event only called once at page initialization? What I am missing here?</p>