javascript - fire jquery mobile panel menu by clicking android native menu button using phonegap/cordova -
I am developing an Android app using Jquery Mobile / Phonegap. To control the phone's menu button I have the following code:
& lt; Script type = "text / javascript" charset = "utf-8" & gt; Delivery on phone / phone call loading // // At this point, the document has been loaded but is not Phonegap-1.0.0.js. // When PhoneGap is loaded and talking to a native device, // this event will call the 'deviceready` // function onload () {document.addEventListener ("DeviceRedi", OnDevice Read, False); } // PhoneGrap is loaded and it is now safe to call Phonegap methods / calls. Devise Readie () {// Register the Event Listener Document. AddEventListener ("Menubutton", at Menukaadown, Incorrect); } // menu on the menu item, turn on the menu button // function. (Warning ("This works");} and on the tag I added:
& lt ; Body onload = "onLoad ()" & gt; So when I click on the Android original menu button, I get the warning message "This works" ... and I would like to know what is the correct code which I need to add there Call the menu based on Jquery mobile. Here is the code of the menu panel:
Data-role = "Panel" id = "mypanel" data-display = " Worry "& gt; & lt; ul data-roll =" list view "class =" buff "> & gt; Lt; / li & gt; li data-icon = "false" & gt; & lt; a href = "# menu" category = "menu" data-transition = "slide" & gt; & lt; img Class = "ui-li-icon" src = "./img/pizza.svg"> option 2 & lt; / li & gt; & Lt; Li data-icon = "false" & gt; & Lt; A href = "# menu" category = "menutext" data-transition = "slide" & gt; & Lt; Img class = "ui-li-icon" src = "./img/tag.svg"> Option 3 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li data-icon = "wrong" & gt; & Lt; A href = "# combina" class = "menutxt" data-transition = "slide" & gt; & Lt; Img class = "ui-li-icon" src = "./img/cart.svg"> Option 4 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; Thanks for watching this .. Your help is highly appreciated.
These are all options / events / ways that you can use for panel in JQM.
Open your panel $ ("#mypanel"). Panel ("open");
Comments
Post a Comment