Jquery Mobile Panel Stops functioning after first use.

Jquery Mobile Panel Stops functioning after first use.

I have a simple Phonegap + Jquery Mobile app ive started developing.

Splash screen loads, app starts

In the header is a button to open a side panel for my menu. Click it once and the menu opens, click away and the menu closes. but from then on you cannot open the panel again the functionality simply doesn't work :(

Here is the entirety of my code to see if someone can see the issue? It should be simple enough and i dont see any problem with the code that could cause the problem.
  1. <!DOCTYPE HTML>
  2. <html>
  3.  <head>
  4.   <title>Craven Weather</title>
  5.   
  6.   <meta name="viewport" content="width=device-width, initial-scale=1"> 
  7.   <script type="text/javascript" charset="utf-8" src="js/cordova-2.7.0.js"></script>
  8. <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
  9. <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
  10. <script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
  11.   <link rel="stylesheet" type="text/css" href="css/myCss.css" />
  12.      
  13.     <script type="text/javascript" charset="utf-8">
  14. document.addEventListener("deviceready", onDeviceReady, false);

  15.       function onDeviceReady() {
  16.            document.addEventListener("backbutton", onBackKeyDown, false);
  17.            document.addEventListener("menubutton", onMenuKeyDown, false);
  18.          }
  19.      
  20.    
  21.      
  22.      // Handle the back button
  23.    function onBackKeyDown() {
  24.      }
  25.     
  26.  // Handle the menu button
  27.  function onMenuKeyDown() {
  28. $( "#menu_panel" ).panel( "open" );
  29.  }  
  30.     </script>
  31.  </head>
  32.  
  33.  
  34.  <body>
  35.    <div data-role="page" data-theme="d" id="home-page" data-url="home-page">
  36.  
  37. <div data-role="header" data-theme="c">
  38.     <h1>Craven Weather</h1>
  39.     <a href="#menu_panel" data-role="button" data-icon="bars" data-iconpos="notext" data-inline="true">Bars</a>
  40. </div>
  41. <div data-role="content">
  42.       <p>Our page content goes here</p>
  43.     </div>
  44.    
  45.    
  46. <div data-role="panel" id="menu_panel"  data-position-fixed="true" data-display="push" data-theme="a">    
  47.     <ul data-role="listview" data-theme="c">
  48.     <li data-icon="delete" data-theme="a"><a href="#" data-rel="close">Main Menu</a></li>
  49.     <li><a href="#">Forecast</a></li>
  50.     <li><a href="#">Craven Map</a></li>
  51.     <li><a href="#">UK Map</a></li>
  52.     <li><a href="#">Euro Map</a></li>
  53.     <li><a href="#">World Map</a></li>
  54.    
  55. </ul>
  56. </div>

  57. </div>
  58.  </body>
  59. </html>