38 lines
777 B
JavaScript
38 lines
777 B
JavaScript
|
/**
|
||
|
* @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);
|