$('#main header').append(menuOpener);
// Add holder list element for menu items
- $("#menu").append('<ul id="menuList"' + v2 + '></ul>');
+ $("#menu").append('<div id="menuList"' + v2 + '><ul></ul></div>');
// Add Search form
var searchElement = (this.fluidbook.settings.search) ? this.getSearch() : '';
$("#menu,#menuOverlay").show();
setTimeout(function () {
$("#menu").addClass('open');
+ this.fluidbook.resize.resizeMenu();
if (focusClose) {
setTimeout(function () {
if ($this.fluidbook.input.isUsingKeyboard()) {
$("#menuOpener").attr('aria-expanded', 'true');
}
this.isOpened = true;
+ this.fluidbook.resize.resizeMenu();
},
closeAll: function () {
},
hideMenuItems: function () {
- gsap.to($('#menuList > li, #shareLinks,footer#mobile-credits'), {duration: 0.1, opacity: 0, display: 'none'});
+ gsap.to($('#menuList >ul > li, #shareLinks,footer#mobile-credits'), {duration: 0.1, opacity: 0, display: 'none'});
},
showMenuItems: function () {
- gsap.to($('#menuList > li, #shareLinks,footer#mobile-credits'), {duration: 0.3, opacity: 1, display: 'block'});
+ gsap.to($('#menuList >ul> li, #shareLinks,footer#mobile-credits'), {duration: 0.3, opacity: 1, display: 'block'});
},
openSearch: function (q, cb) {
return false;
}
this.resizeHorizontalNav();
- if (!this.fluidbook.nav.menuIsOpen) return false;
+ if (!this.fluidbook.nav.burger.isOpened) {
+ return false;
+ }
var wh = $(window).height();
var formHeight = $('#searchForm').height();
// Max-height for the top level of the main menu so it can scroll between the search box and sharing bar
$('#menuList > ul').css('maxHeight', mainMenuMaxHeight);
+ console.log(mainMenuMaxHeight);
// Set max-height for search results section (using CSS vh units was unreliable)
if (this.fluidbook.search.menuSearchResults !== undefined) {