Base theme for LMMI Journal
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
1020 B

6 years ago
jQuery(document).ready(function($) {
var slideout = new Slideout({
'panel':document.querySelector('.page-container'),
'menu': document.querySelector('.slideout'),
'padding': 300,
'tolerance': 70,
'side': drupalSettings.magazineplus.slideoutInit.slideoutSide,
'touch': drupalSettings.magazineplus.slideoutInit.slideoutTouchSwipe
});
$('.slideout-toggle').fadeIn('fast');
// Toggle button
document.querySelector('.slideout-toggle').addEventListener('click', function() {
slideout.toggle();
var topValue = $('body').css('padding-top');
$(".slideout-menu").css("top", topValue);
});
slideout.on('beforeopen', function() {
document.querySelector('.slideout-toggle--fixed').classList.add('js-slideout-toggle--fixed-open');
$(".slideout .sf-accordion").addClass("sf-expanded").removeClass("sf-hidden");
});
slideout.on('beforeclose', function() {
document.querySelector('.slideout-toggle--fixed').classList.remove('js-slideout-toggle--fixed-open');
});
});