Skip to content

Commit 54274a7

Browse files
committed
Add cycle feature for senior design fair
1 parent c96f092 commit 54274a7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,24 @@ <h6>Team leader &bull; Android app</h6>
434434
return Math.abs(currentTop - targetTop) / 3;
435435
},
436436
});
437+
438+
if (location.hash === "#cycle") {
439+
function scrollDown() {
440+
s.animateTo(s.getMaxScrollTop(), {
441+
duration: 25000,
442+
done: scrollUp
443+
});
444+
}
445+
function scrollUp() {
446+
s.animateTo(0, {
447+
duration: 4000,
448+
done: function() {
449+
setTimeout(scrollDown, 5000);
450+
}
451+
});
452+
}
453+
scrollDown();
454+
}
437455
</script>
438456
</body>
439457
</html>

0 commit comments

Comments
 (0)