我的代码:
<div class="mui-content" id="pullrefresh">
<button id='demo5' data-options='{"type":"time"}' class="btn mui-btn mui-btn-block">选择时间 ...</button>
<div type="text" id="inp"/>请选择</div>
</div>
<script src="js/mui.min.js"></script>
<script src="js/zepto.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/mui.picker.min.js"></script>
<script type="text/javascript">
mui.init({
pullRefresh: {
container: '#pullrefresh',
down: {
style:'circle',
callback: pulldownRefresh
}
}
});
function pulldownRefresh(){
setTimeout(function(){
mui('#pullrefresh').pullRefresh().endPulldown();
},1000)
}
//打开时间选择器
var inp = $('#inp');
mui(".mui-content").on('tap','#demo5',function(){
if(mui.os.ios|| mui.os.ipad || mui.os.iphone||mui.os.android) {
//此代码的作用是为了解决使用单WEBVIEW下拉刷新时与日历插件的冲突;
mui('#pullrefresh').pullRefresh().scrollTo(0,10,100);
}
var dtPicker = new mui.DtPicker({"type":"time"});
dtPicker.show(function (selectItems) {
inp.text(selectItems.text)
dtPicker.dispose();
})
},false)
</script>
怎么当picker组件跳出禁止下拉刷新呢?
我尝试的方法:
在点击弹出加上mui("#pullrefresh").pullRefresh().setStopped(true),没用,直接报错:Cannot set property 'className' of undefined at
js/mui.min.js:8。求大神分享解决办法