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

Line 33: Line 33:
 
   }
 
   }
 
   }
 
   }
 
  /*$('body').on('touchmove touchstart', function (event) {
 
    event.preventDefault();
 
  });*/
 
 
 
 
    
 
    
 
   /*Mobile Control*/
 
   /*Mobile Control*/
Line 69: Line 64:
 
  break;
 
  break;
 
  case "touchmove":
 
  case "touchmove":
 
 
 
  clientY=touchEvent.touches[0].clientY;
 
  clientY=touchEvent.touches[0].clientY;
  //alert(clientY);
 
  //alert(clientY_start);
 
 
  deltaY=clientY-clientY_start;
 
  deltaY=clientY-clientY_start;
  //clientY_start=clientY;
 
  //alert(deltaY);
 
 
   
 
   
 
  //开头结尾检测
 
  //开头结尾检测
Line 103: Line 93:
 
  if(moveY>0){
 
  if(moveY>0){
 
  if(tag>1){
 
  if(tag>1){
      tag--;
+
      tag--;
 
      $(".s1 > div").css("transform","translateY(" + -(document_Height)*(tag-1) + "px)");
 
      $(".s1 > div").css("transform","translateY(" + -(document_Height)*(tag-1) + "px)");
 
  setTimeout(function(){doscroll = true;paa.innerHTML = "removed"+doscroll;},transitionTime);
 
  setTimeout(function(){doscroll = true;paa.innerHTML = "removed"+doscroll;},transitionTime);
Line 114: Line 104:
 
  setTimeout(function(){doscroll = true;paa.innerHTML = "removed"+doscroll;},transitionTime);
 
  setTimeout(function(){doscroll = true;paa.innerHTML = "removed"+doscroll;},transitionTime);
 
  paa.innerHTML = "tag=" + tag;
 
  paa.innerHTML = "tag=" + tag;
 +
  }else(tag=tagRange){
 +
  setTimeout(function(){doscroll = true;paa.innerHTML = "removed"+doscroll;},transitionTime);
 
  }
 
  }
 
  }
 
  }

Revision as of 01:29, 18 July 2018