Skip to content

Commit 65a3ce6

Browse files
kaitlinnewsonphette23
authored andcommitted
remove timeline scrolling effect
1 parent 2d46a73 commit 65a3ce6

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

assets/js/main.js

-30
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,5 @@
11

22
jQuery(document).ready(function($){
3-
var timelineBlocks = $('.cd-timeline-block'),
4-
offset = 0.8;
5-
6-
//hide timeline blocks which are outside the viewport
7-
hideBlocks(timelineBlocks, offset);
8-
9-
//on scolling, show/animate timeline blocks when enter the viewport
10-
$(window).on('scroll', function(){
11-
if (window.requestAnimationFrame) {
12-
return window.requestAnimationFrame(function(){ showBlocks(timelineBlocks, offset) });
13-
}
14-
return setTimeout(function(){ showBlocks(timelineBlocks, offset) }, 100)
15-
});
16-
17-
function hideBlocks(blocks, offset) {
18-
blocks.each(function(){
19-
if ($(this).offset().top > $(window).scrollTop() + $(window).height() * offset) {
20-
$(this).find('.cd-timeline-img, .cd-timeline-content').addClass('is-hidden')
21-
}
22-
});
23-
}
24-
25-
function showBlocks(blocks, offset) {
26-
blocks.each(function(){
27-
if ($(this).offset().top <= $(window).scrollTop() + $(window).height() * offset &&
28-
$(this).find('.cd-timeline-img').hasClass('is-hidden')) {
29-
$(this).find('.cd-timeline-img, .cd-timeline-content').removeClass('is-hidden').addClass('bounce-in')
30-
}
31-
});
32-
}
333

344
$('.sort-workshop-time').click(function(){
355
console.log('sort event - time')

0 commit comments

Comments
 (0)