|
我想实现android平台上点击menuButton显示出特定的actionsheet,然后再次点击menuButton或者backButton关闭就可以关闭掉actionsheet,应该如何在下面的closeMenu中的横线处写js呢?谢谢~- function onMenuKeyDown() {
- $("#afui").actionsheet(
- [{
- text: '版本更新',
- cssClasses: '',
- handler: function () {
-
- }
- }, {
- text: '意见反馈',
- cssClasses: '',
- handler: function () {
-
- }
- }, {
- text: '退出',
- cssClasses: 'red',
- handler: function () {
- exitApp();
- }
- }]);
- document.removeEventListener("menubutton", onMenuKeyDown, false);
- document.removeEventListener("backbutton", onBackKeyDown, false);
- document.addEventListener("menubutton", closeMenu, false);
- document.addEventListener("backbutton", closeMenu, false);
- }
-
- function closeMenu() {
- __________
-
- document.removeEventListener("menubutton", closeMenu, false);
- document.removeEventListener("backbutton", closeMenu, false);
- document.addEventListener("menubutton", onMenuKeyDown, false);
- document.addEventListener("backbutton", onBackKeyDown, false);
- }
复制代码
|
|