nriault/js/timeline.js
2018-09-12 00:03:10 +02:00

52 lines
1.1 KiB
JavaScript

$(function(){
window.sr = ScrollReveal();
if ($(window).width() < 768) {
if ($('.timeline-content').hasClass('js--fadeInLeft')) {
$('.timeline-content').removeClass('js--fadeInLeft').addClass('js--fadeInRight');
}
sr.reveal('.js--fadeInRight', {
origin: 'right',
distance: '300px',
easing: 'ease-in-out',
duration: 800,
});
} else {
sr.reveal('.js--fadeInLeft', {
origin: 'left',
distance: '300px',
easing: 'ease-in-out',
duration: 800,
});
sr.reveal('.js--fadeInRight', {
origin: 'right',
distance: '300px',
easing: 'ease-in-out',
duration: 800,
});
}
sr.reveal('.js--fadeInLeft', {
origin: 'left',
distance: '300px',
easing: 'ease-in-out',
duration: 800,
});
sr.reveal('.js--fadeInRight', {
origin: 'right',
distance: '300px',
easing: 'ease-in-out',
duration: 800,
});
});