im quite new at js and jqm. So I have a basic script that opens a panel when I scroll the the side. I use #panel on all of the pages however the script will only work for the first page. Whats the best way to make this work for ever page? Do I have to include it at the end of every page? Should I individually name each panel and do ("#panel, #panel2") etc. 

```
<script>
$( document ).on( "pageinit", document, function() {
    $( document ).on( "swipeleft", document, function( e ) {

        if ( $.mobile.activePage.jqmData( "panel" ) !== "open" ) {
            if ( e.type === "swipeleft"  ) {
               $( "#mypanel" ).panel( "open" );
            }
        }
    });
});    
</script>

```