$(function(){
$("#all").css({"height":"auto","width":"100%","overflow":"hidden","float":"left"})//追加样式
if($(document).height() >$(window).height()){
$("#all").css({"height":$(window).height()-35,"width":"100%","overflow":"auto","float":"left"})//追加样式
}
$(window).resize(function(){
$("#all").css({"height":"auto","width":"100%","overflow":"auto","float":"left"})//追加样式
if( $("#all").height() >= $(window).height()-35() ){
$("#all").css({"height":$(window).height()-35,"width":"100%","overflow":"auto","float":"left"})//追加样式
}else{
$("#all").css({"height":$(window).height()-35,"width":"100%","overflow":"hidden","float":"left"})//追加样式
}
})
}) 将要添加滚动条的部分用<DIV ID="all" ></div> 包含进来
</script>
//增加代码$(document).swipeLeft(function(){
if (isAnimating) return
last.row = now.row
last.col = now.col
if (last.row>2 &&last.row<4 &&last.col==2) { now.row = last.rownow.col = 3pageMove(towards.left)}
})
$(document).swipeLeft(function(){
if (isAnimating) return
last.row = now.row
last.col = now.col
if (last.row>2 &&last.row<4 &&last.col==3) { now.row = last.rownow.col = 4pageMove(towards.left)}
})
$(document).swipeRight(function(){
if (isAnimating) return
last.row = now.row
last.col = now.col
if (last.row>2 &&last.row<4 &&last.col==4) { now.row = last.rownow.col = 3pageMove(towards.right)}
})
$(document).swipeRight(function(){
if (isAnimating) return
last.row = now.row
last.col = now.col
if (last.row>2 &&last.row<4 &&last.col==3) { now.row = last.rownow.col = 2pageMove(towards.right)}
})
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)