Line 6: | Line 6: | ||
var document_Height = $(window).height(); | var document_Height = $(window).height(); | ||
var document_Width = document.body.clientWidth; | var document_Width = document.body.clientWidth; | ||
+ | |||
var tag=1; | var tag=1; | ||
var tagRange=7; | var tagRange=7; | ||
− | |||
var transitionTime=700; | var transitionTime=700; | ||
+ | |||
+ | var doscroll=true; | ||
$(".ssection").css("height",document_Height); | $(".ssection").css("height",document_Height); | ||
$(".s1").css("height",document_Height); | $(".s1").css("height",document_Height); | ||
Line 30: | Line 32: | ||
} | } | ||
doscroll = false; | doscroll = false; | ||
− | setTimeout( | + | setTimeout(update(),transitionTime); |
} | } | ||
} | } | ||
Line 95: | Line 97: | ||
tag--; | tag--; | ||
$(".s1 > div").css("transform","translateY(" + -(document_Height)*(tag-1) + "px)"); | $(".s1 > div").css("transform","translateY(" + -(document_Height)*(tag-1) + "px)"); | ||
− | setTimeout( | + | setTimeout(update(),transitionTime); |
paa.innerHTML = "tag=" + tag; | paa.innerHTML = "tag=" + tag; | ||
} | } | ||
Line 102: | Line 104: | ||
tag++; | tag++; | ||
$(".s1 > div").css("transform","translateY(" + -(document_Height)*(tag-1) + "px)"); | $(".s1 > div").css("transform","translateY(" + -(document_Height)*(tag-1) + "px)"); | ||
− | setTimeout( | + | setTimeout(update(),transitionTime); |
paa.innerHTML = "tag=" + tag; | paa.innerHTML = "tag=" + tag; | ||
}else if(tag===tagRange){ | }else if(tag===tagRange){ | ||
− | setTimeout(function(){doscroll = true;paa.innerHTML = "removed"+doscroll;},transitionTime); | + | //setTimeout(function(){doscroll = true;paa.innerHTML = "removed"+doscroll;},transitionTime); |
+ | setTimeout(update(),transitionTime); | ||
} | } | ||
} | } | ||
Line 112: | Line 115: | ||
if(Math.abs(mTop_changed)<document_Height/2){ | if(Math.abs(mTop_changed)<document_Height/2){ | ||
$(".s1 > div").css("transform","translateY(" + -(document_Height)*(tag-1) + "px)"); | $(".s1 > div").css("transform","translateY(" + -(document_Height)*(tag-1) + "px)"); | ||
− | setTimeout( | + | setTimeout(update(),transitionTime); |
}else{ | }else{ | ||
if(moveY>0){ | if(moveY>0){ | ||
Line 118: | Line 121: | ||
tag--; | tag--; | ||
$(".s1 > div").css("transform","translateY(" + -(document_Height)*(tag-1) + "px)"); | $(".s1 > div").css("transform","translateY(" + -(document_Height)*(tag-1) + "px)"); | ||
− | setTimeout( | + | setTimeout(update(),transitionTime); |
paa.innerHTML = "tag=" + tag; | paa.innerHTML = "tag=" + tag; | ||
} | } | ||
Line 125: | Line 128: | ||
tag++; | tag++; | ||
$(".s1 > div").css("transform","translateY(" + -(document_Height)*(tag-1) + "px)"); | $(".s1 > div").css("transform","translateY(" + -(document_Height)*(tag-1) + "px)"); | ||
− | setTimeout( | + | setTimeout(update(),transitionTime); |
paa.innerHTML = "tag=" + tag; | paa.innerHTML = "tag=" + tag; | ||
} | } | ||
Line 139: | Line 142: | ||
} | } | ||
} | } | ||
+ | function update(){ | ||
+ | var doscroll=true; | ||
+ | var classStatus=0; | ||
+ | paa.innerHTML = "removed"+doscroll; | ||
+ | if(tag>1){ | ||
+ | if(tag<=4){ | ||
+ | if(!classStatus){ | ||
+ | $("#promoter .promoter_title").removeClass("fadeOutRight"); | ||
+ | $("#promoter .promoter_title").addClass("fadeInRight"); | ||
+ | classStatus=1; | ||
+ | }else{ | ||
+ | |||
+ | } | ||
+ | }else{ | ||
+ | if(classStatus){ | ||
+ | $("#promoter .promoter_title").removeClass("fadeInRight"); | ||
+ | $("#promoter .promoter_title").addClass("fadeOutRight"); | ||
+ | classStatus=0; | ||
+ | }else{ | ||
+ | |||
+ | } | ||
+ | } | ||
+ | }else{ | ||
+ | $("#promoter .promoter_title").removeClass("fadeInRight"); | ||
+ | $("#promoter .promoter_title").addClass("fadeOutRight"); | ||
+ | classStatus=0; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
}); | }); | ||
</script> | </script> | ||
</html> | </html> |
Revision as of 06:19, 18 July 2018