Skip to content

Instantly share code, notes, and snippets.

@jerone
Forked from macdonst/menu.js
Created November 30, 2012 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jerone/4176054 to your computer and use it in GitHub Desktop.
Save jerone/4176054 to your computer and use it in GitHub Desktop.
Cordova OptionsMenu example
var optionsmenu = new OptionsMenu({
id: "optionsmenu",
items: [
{
label: "Settings",
image: "menu/settings.png",
action: onSettings
},
{
label: "Help",
image: "menu/help.png",
action: onHelp
}
]
});
function onSettings() {
console.log("settings");
};
function onHelp() {
console.log("help");
};
<script type="text/javascript" charset="utf-8" src="OptionsMenu.js"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment