-
-
Save JoshuaJones/bdad2416a254a17c748c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="progress_bar_container"> | |
<div class="progress_bar"></div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var slider = $('#introSlider'); | |
slider.flexslider({ | |
animation: "slide", | |
directionNav: false, | |
slideshow: true, | |
slideshowSpeed: 8000, | |
animationSpeed: 1500, | |
start: function(slider){ | |
//initial load | |
positionSlide(); | |
$(window).resize(positionSlide); | |
$('#introSlider .slides > li').fadeIn(350); | |
$('.caption').fadeIn(350); | |
$('body').removeClass('loading'); | |
var progressBar = $('.progress_bar'); | |
progressBar.animate({'width': "100%"}, 8000, function(){ | |
$(this).css({'width' : 0}) | |
}); | |
$(".flex-control-paging li a").on("click", function(){ | |
$('.progress_bar_container').fadeOut(300); | |
}); | |
// setTimeout(function(){ | |
// $('.caption').fadeOut(500); | |
// }, 8000) | |
}, | |
before: function(){ | |
//fires with each slide transition | |
$('.caption').fadeOut(500); | |
$('.progress_bar').animate({'width': "100%"}, 8000, function(){ | |
$(this).css({'width' : 0}) | |
}); | |
}, | |
after: function(){ | |
//firs after each slide completes | |
$('.caption').fadeIn(350); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment