title: jquery mobile Panel Swipe function causing errors
body: <p>I'm having such a hard time, I have a flip clock using mootools, then a weather widget using Yahoo API, now I have no idea what is causing </p>
  
  <blockquote>
    <p>"cannot call methods on panel prior to initialization; attempted to
    call method 'open'"</p>
  </blockquote>
  
  <p>SO i followed this demo, <a href="http://view.jquerymobile.com/master/docs/examples/panels/panel-swipe-open.php#demo-page" rel="nofollow">http://view.jquerymobile.com/master/docs/examples/panels/panel-swipe-open.php#demo-page</a> and now i'm getting the error.</p>
  
  <pre><code>$( document ).on( "pageinit", "#demo-page", function() {
  $( document ).on( "swipeleft swiperight", "#demo-page", function( e ) {
      // We check if there is no open panel on the page because otherwise
      // a swipe to close the left panel would also open the right panel (and v.v.).
      // We do this by checking the data that the framework stores on the page element (panel: open).
      if ( $.mobile.activePage.jqmData( "panel" ) !== "open" ) {
          if ( e.type === "swipeleft"  ) {
              $( "#right-panel" ).panel( "open" );
          } else if ( e.type === "swiperight" ) {
              $( "#left-panel" ).panel( "open" );
          }
      }
  });
  </code></pre>
  
  <p>});</p>
  
  <p>I'm sorta at a dead end cause I had it work, feel free to look at my code, <a href="http://yaasko.com/gra423/project-4.3/" rel="nofollow">http://yaasko.com/gra423/project-4.3/</a> if you try to swipe left or right the console will output the error.</p>
  
  <p>Please let me know if you can help, first time jquery mobile user!</p>