website/themes/contrib/bootstrap_mint/js/bootstrap-minte628.js

38 lines
777 B
JavaScript
Raw Normal View History

2023-09-30 09:40:37 +02:00
/**
* @file
* Contains JavaScript used in Bootstrap Mint theme.
*/
(function ($) {
'use strict';
// Responsive main menu.
$('#main-menu').smartmenus();
// Main menu toggle.
$('.navbar-toggle').click(function () {
$('.region-primary-menu').slideToggle();
});
// Hide dropdown menu.
if ($(window).width() < 768) {
$('.region-primary-menu li a:not(.has-submenu)').click(function () {
$('.region-primary-menu').hide();
});
}
// Sliding header.
$('.toggle-switch').click(function () {
$('#sliding-header-wrap').slideToggle();
});
// Bootstrap tooltip.
$('[data-toggle=tooltip]').tooltip();
// Smooth scroll to top.
$('#toTop a').click(function () {
$('body,html').animate({scrollTop: 0}, 1000);
});
})(jQuery);