'].join("");
$("body").append(back_to_top_button)
// Der Button wird ausgeblendet
$(".back-to-top").hide();
// Funktion für das Scroll-Verhalten
$(function () {
$(window).scroll(function () {
if ($(this).scrollTop() > 200) { // Wenn 100 Pixel gescrolled wurde
$('.back-to-top').fadeIn();
} else {
$('.back-to-top').fadeOut();
}
});
$('.back-to-top').click(function () { // Klick auf den Button
$('body,html').animate({
scrollTop: 0
}, 800);
return false;
});
});
$('.carousel').carousel({
interval: 7000,
pause: false
})
// SideNav Button Initialization
$('.button-collapse').sideNav({
edge: 'left', // Choose the horizontal origin
closeOnClick: false, // Closes side-nav on <a> clicks, useful for Angular/Meteor
breakpoint: 1440, // Breakpoint for button collapse
MENU_WIDTH: 240, // Width for sidenav
timeDurationOpen: 300, // Time duration open menu
timeDurationClose: 200, // Time duration open menu
timeDurationOverlayOpen: 50, // Time duration open overlay
timeDurationOverlayClose: 200, // Time duration close overlay
easingOpen: 'easeOutQuad', // Open animation
easingClose: 'easeOutCubic', // Close animation
showOverlay: true, // Display overflay
showCloseButton: false // Append close button into siednav
});// SideNav Scrollbar Initialization
var sideNavScrollbar = document.querySelector('.custom-scrollbar');
var ps = new PerfectScrollbar(sideNavScrollbar);
});
$(function(){
$(".sticky-content").sticky({
topSpacing: 50,
zIndex: 2,
stopper: "#footer",
});
});
var shrinkHeader = 1200;
$(window).scroll(function() {
var scroll = getCurrentScroll();
if ( scroll >= shrinkHeader ) {
$('.sidenavi').addClass('fest');
} else {
$('.sidenavi').removeClass('fest');
}
});
function getCurrentScroll() {
return window.pageYOffset || document.documentElement.scrollTop;
}