definicao de layout
This commit is contained in:
21
public/assets/js/timeline/timeline-v-1/main.js
Normal file
21
public/assets/js/timeline/timeline-v-1/main.js
Normal file
@@ -0,0 +1,21 @@
|
||||
(function($) {
|
||||
"use strict";
|
||||
var timelineBlocks = $('.cd-timeline-block'),
|
||||
offset = 0.8;
|
||||
hideBlocks(timelineBlocks, offset);
|
||||
$(window).on('scroll', function(){
|
||||
(!window.requestAnimationFrame)
|
||||
? setTimeout(function(){ showBlocks(timelineBlocks, offset); }, 100)
|
||||
: window.requestAnimationFrame(function(){ showBlocks(timelineBlocks, offset); });
|
||||
});
|
||||
function hideBlocks(blocks, offset) {
|
||||
blocks.each(function(){
|
||||
( $(this).offset().top > $(window).scrollTop()+$(window).height()*offset ) && $(this).find('.cd-timeline-img, .cd-timeline-content').addClass('is-hidden');
|
||||
});
|
||||
}
|
||||
function showBlocks(blocks, offset) {
|
||||
blocks.each(function(){
|
||||
( $(this).offset().top <= $(window).scrollTop()+$(window).height()*offset && $(this).find('.cd-timeline-img').hasClass('is-hidden') ) && $(this).find('.cd-timeline-img, .cd-timeline-content').removeClass('is-hidden').addClass('bounce-in');
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
||||
1
public/assets/js/timeline/timeline-v-2/jquery.timeliny.min.js
vendored
Normal file
1
public/assets/js/timeline/timeline-v-2/jquery.timeliny.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
|
||||
(function($) {
|
||||
"use strict";
|
||||
$(function() {
|
||||
$('#timeline-2').timeliny({
|
||||
hideBlankYears: true
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
Reference in New Issue
Block a user