title: Best way to structure a multiple page application in Javascript
body: <p>As an Actionscript programmer shifting to JS/jQuery I often have to author multipage apps targeted mainly to iOS and I'd like to know what is the best way to structure such apps.</p>
  
  <p>Most of the time my apps are presentations, where each page has a different behavior (i.e., some popups on page1, a group of sliders on page2, some drag and drop action on page3... you get the picture), and more often than not I have to keep track of several variables across different pages.</p>
  
  <p>Right now I handle it like this: I have a group of common functions in a script named <code>my_app.js</code>, while each page has its dedicated <code>pageX.js</code> script to account for its specific duties. I store persistent values through the <code>storage.js</code> library and somehow manage to stick it all together and make it work.</p>
  
  <p>However I recognize that there may be a vast area for improvement to this approach, so I'd like to know how more seasoned developers deal with this situation.</p>
  
  <p>Thanks a lot,</p>
  
  <p>Goblin</p>