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

Line 92: Line 92:
 
  break;
 
  break;
 
  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;}//检测是否滑动,与边缘有关
  paa.innerHTML = "tag=" + tag + "removed";
+
  paa.innerHTML = "tag=" + tag + "removed" + clientY_end;
 
  moveY=clientY_end-clientY_start;
 
  moveY=clientY_end-clientY_start;
 
  swipe_t2=new Date().getTime();
 
  swipe_t2=new Date().getTime();
Line 111: Line 110:
 
  }else{
 
  }else{
 
  if(tag<tagRange){
 
  if(tag<tagRange){
 
 
 
      tag++;
 
      tag++;
 
      $(".s1 > div").css("transform","translateY(" + -(document_Height)*(tag-1) + "px)");
 
      $(".s1 > div").css("transform","translateY(" + -(document_Height)*(tag-1) + "px)");
Line 147: Line 145:
 
  }
 
  }
 
  }
 
  }
  /*function amend(){//以防万一错位
 
  var floor=Math.round($(".s1 > div").offset().top/document_Height);//,分别输出section height 与client height的值
 
  $(".s1 > div").animate({marginTop: document_Height * floor - 1 },500,"swing");
 
  }*/
 
 
 
 
 
   }
 
   }
 
    
 
    

Revision as of 01:14, 18 July 2018