Difference between revisions of "Team:Jilin China/Home Js"

Line 2: Line 2:
 
<script>
 
<script>
 
$(document).ready(function(){
 
$(document).ready(function(){
   //$(widnow).scrollTop(0);//强制回到开头避免加载残缺
+
   //$(widnow).scrollTop(0);//强制回到开头避免加载残缺,还不稳定并且摧毁性极强。。千万别打开。。
 
   $(document).bind('mousewheel DOMMouseScroll',mouseScroll);//鼠标滚轮事件绑定
 
   $(document).bind('mousewheel DOMMouseScroll',mouseScroll);//鼠标滚轮事件绑定
 
   $(document).keydown(mouseScroll);//键盘上下事件绑定
 
   $(document).keydown(mouseScroll);//键盘上下事件绑定
Line 86: Line 86:
 
  case "touchend":
 
  case "touchend":
 
  $(".s1 > div").css("transition", transition);
 
  $(".s1 > div").css("transition", transition);
  if(!swipeStatus){clientY_end=touchEvent.changedTouches[0].clientY;}//检测是否滑动,与边缘有关
+
// if(!swipeStatus){clientY_end=touchEvent.changedTouches[0].clientY;}//检测是否滑动,与边缘有关
 
   
 
   
 
  moveY=clientY_end-clientY_start;
 
  moveY=clientY_end-clientY_start;

Revision as of 06:23, 20 July 2018