【网寻】mui - 点击事件

//本来是需要这样的,结果点击无响应
$(".mui-control-item").on("click",function(event){
    alert(1)
});
    
//换成以下就可以了,$(".top-menu-list") 为本来的事件源的父级        
$(".top-menu-list").on("tap",".mui-control-item",function(event){
    alert(1)
});
//如果是 a 点击无效,用以下方法试试
mui('body').on('tap', 'a', function() {                                        
        window.top.location.href = this.href;
});

猜你喜欢

转载自www.cnblogs.com/JaneBlog/p/9373321.html