Files
praxis-page/static/js/scripts.js
T
Brummel 59c3bae5b2 fix(js): remove dead testimonialSlider/flexslider call from scripts.js
After the flexslider asset removal, scripts.js still tried to call
$('.testimonialSlider').flexslider(...) which threw a TypeError in the
browser console on every page. The element does not exist in this
rebuild and never will — testimonials were a feature of the original
Grav theme that we are not porting. Hero carousel and employees
carousel are both Bootstrap-3, auto-initialized via data-ride.

No functional impact on the page (every initializer before this block
already ran), just a noisy console error.
2026-05-21 11:33:51 +02:00

93 lines
2.6 KiB
JavaScript

jQuery(function ($) {
'use strict';
// -------------------------------------------------------------
// Preloader
// -------------------------------------------------------------
(function () {
$('#status').fadeOut();
$('#preloader').delay(200).fadeOut('slow');
}());
// ------------------------------------------------------------------
// sticky menu
// ------------------------------------------------------------------
$(window).scroll(function() {
if ($(".navbar").offset().top > 50) {
$(".navbar-fixed-top").addClass("sticky-nav");
} else {
$(".navbar-fixed-top").removeClass("sticky-nav");
}
});
// -------------------------------------------------------------
// mobile menu
// -------------------------------------------------------------
(function () {
$('button.navbar-toggle').ucOffCanvasMenu({
documentWrapper: '#main-wrapper',
contentWrapper : '.content-wrapper',
position : 'uc-offcanvas-left', // class name
// opener : 'st-menu-open', // class name
effect : 'slide-along', // class name
closeButton : '#uc-mobile-menu-close-btn',
menuWrapper : '.uc-mobile-menu', // class name below-pusher
documentPusher : '.uc-mobile-menu-pusher'
});
}());
// -------------------------------------------------------------
// tooltip
// -------------------------------------------------------------
(function () {
$('[data-toggle="tooltip"]').tooltip()
}());
// ------------------------------------------------------------------
// jQuery for back to Top
// ------------------------------------------------------------------
(function(){
$('body').append('<div id="toTop"><i class="fa fa-angle-up"></i></div>');
$(window).scroll(function () {
if ($(this).scrollTop() != 0) {
$('#toTop').fadeIn();
} else {
$('#toTop').fadeOut();
}
});
$('#toTop').on('click',function(){
$("html, body").animate({ scrollTop: 0 }, 600);
return false;
});
}());
// testimonialSlider block removed — used flexslider for a widget that
// does not exist in this rebuild. Hero carousel and employees carousel
// are both Bootstrap-3, initialized via data-ride="carousel".
}); // JQuery end
$(document).on('click', '.m-menu .dropdown-menu', function(e) {
e.stopPropagation()
})