?
| Current Path : /home/webyoo/www/backup/allback/docteur-site/cv/sym/a/backup/allback/docteur-site/js/ |
| Current File : /home/webyoo/www/backup/allback/docteur-site/cv/sym/a/backup/allback/docteur-site/js/scripts.js |
/*---------- Page scrolling ----------*/
$(function() {
$('.page-scroll a').bind('click', function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 1500, 'easeInOutExpo');
event.preventDefault();
});
});
/*----------*/
/*----------*/
/*---------- Background slideshow ----------*/
$('#hero').backstretch([
"img/bg-0.jpg",
"img/bg-5.jpg",
"img/bg-6.jpg",
"img/bg-7.jpg"
], {fade: 750, duration: 8000});
/*----------*/
/*---------- Auto hide collapse navbar ----------*/
$(document).on('click',function(){
$('.collapse').collapse('hide');
})
/*----------*/
///////////////////MH
$(window).scroll(function() {
if ($(this).scrollTop() >= 50) { // If page is scrolled more than 50px
$('#return-to-top').fadeIn(200); // Fade in the arrow
} else {
$('#return-to-top').fadeOut(200); // Else fade out the arrow
}
});
$('#return-to-top').click(function() { // When arrow is clicked
$('body,html').animate({
scrollTop : 0 // Scroll to top of body
}, 500);
});