$(document).ready(function () {
(function () {
var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
window.requestAnimationFrame = requestAnimationFrame;
})();
var windowHeight = $(window).height();
function animate(timelineBlock, time) {
timelineBlock.each(function () {
if ($(this).offset().top <= $(window).scrollTop() + windowHeight * time && $(this).hasClass("invisible")) {
$(this).removeClass("invisible").addClass("animated slideInUp")
}
});
}
var timelineBlock = $('.js-timeline-animate'), time = 1;
$(window).on('scroll', function () {
requestAnimationFrame ? requestAnimationFrame(function () {
animate(timelineBlock, time)
}) : setTimeout(function () {
animate(timelineBlock, time)
}, 100)
})
});