jquery阻止默认滑动

        $(".swiper-slide").click(function(){

            var index = imgarr[$(this).index()];
            var content = "<img class='a' src="+index+" />";
            $(".mengceng").show();
            $(".model").html(content).show();
            $("body").bind("touchmove", foo);
        });

        $(".mengceng").click(function(){
            $(".mengceng").hide();
            $("body").unbind("touchmove", foo);
        });
1     function foo(e){
2         e.preventDefault();
3     }

 

posted @ 2016-01-18 17:03  挥刀  阅读(964)  评论(0)    收藏  举报