H5页面在电脑端,安卓都没有问题,就是在IOS端不能点击;
//old—不生效
$(function(){
$(".tab-tit li").click(function(){
$(this).addClass("current").siblings().removeClass("current");
var qq=$(this).index();
$(".tab-con:eq("+qq+")").show().siblings(".tab-con").hide();
})
})
//new –成功
$(document).on('touchend click','.tab-tit li', function(){
$(this).addClass("current").siblings().removeClass("current");
var qq=$(this).index();
$(".tab-con:eq("+qq+")").show().siblings(".tab-con").hide();
}) ;
欢迎关注,有问题一起学习欢迎留言、评论
你要保守你心,胜过保守一切。
作者:刘俊涛的博客