<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title></title>
<script src="../js/mui.min.js"></script>
<link href="../css/mui.min.css" rel="stylesheet"/>
</head>
<body>
<div class="mui-content">
<a href="#sheet" id="openSheet" class="mui-btn mui-btn-primary mui-btn-block">打开操作表</a>
</div>
<div id="sheet1" class="mui-popover mui-popover-bottom mui-popover-action ">
<!-- 可选择菜单 -->
<ul class="mui-table-view kong">
<li class="mui-table-view-cell">
<a href="#">菜单122</a>
</li>
<li class="mui-table-view-cell">
<a href="#">菜单211</a>
</li>
</ul>
<!-- 取消菜单 -->
<ul class="mui-table-view">
<li class="mui-table-view-cell">
<a href="#sheet1"><b>取消</b></a>
</li>
</ul>
</div>
</body>
<script type="text/javascript" charset="utf-8">
mui.init();
document.getElementById('openSheet').addEventListener('tap',function () {
mui('#sheet1').popover('toggle');
})
//mmon
mui(".kong").on("tap","a",foo_1);
//点击li时,执行foo_2函数
// function foo_1(e){
// console.log(e.explicitOriginalTarget.data);
// }
function foo_1(){
console.log(this.text);
}
//取消特定回调off
//点击li时,不再执行foo_1函数,但会继续执行foo_2函数
//mui("#list").off("tap","li",foo_1);
//点击li时,上的所有函数均不再执行
mui("#list").off("tap","li");
//off(event)适用于取消当前元素上绑定的特定事件的所有回调,例如:
//点击li时,不再执行foo_1函数;点击p时,也不再执行foo_3函数
mui("#list").off("tap");
mui.trigger(dom,'tap',{a:'as'})
</script>
</html>