title: PhoneGap 1.5 "menubutton" and "searchbutton" with jQuery Mobile
body: <p>I am playing with my first PhoneGap/Android app, and am having trouble triggering  <code>$.mobile.changePage()</code> from a PhoneGap/Cordova Event.</p>
  
  <p>I've updated the code, whereas before it would trigger once. Now it does not trigger at all, but is closer to how it probably should be done.</p>
  
  <p>Here is my code: </p>
  
  <pre><code>    $(document).on('pageinit', function() {
          document.addEventListener("searchbutton", onSearchKeyDown, false); //never fires
          document.addEventListener("menubutton", onMenuKeyDown, false); //never fires
          alert("triggered"); //does fire
      });
  
      // search button press
      function onSearchKeyDown() {
          //change to search page
          alert("search");
          $.mobile.changePage("#page4", {transition: "pop"});
      }
  
      //menu button press
      function onMenuKeyDown() {
          //change to start page
          alert("menu");
          $.mobile.changePage("#page1", {transition: "pop"});
      }
  </code></pre>