this.checkLogoVisibility();
$(window).scrollTop(0);
- $(this.fluidbook).trigger('fluidbook.resize', {ww: this.ww, hh: this.hh, orientation: this.orientation, fluidbookrect: $("#fluidbook").get(0).getBoundingClientRect()});
+ $(this.fluidbook).trigger('fluidbook.resize', {
+ ww: this.ww,
+ hh: this.hh,
+ orientation: this.orientation,
+ fluidbookrect: $("#fluidbook").get(0).getBoundingClientRect()
+ });
},
resizeNav: function (interfaceScale) {
var $this = this;
var marginBottom;
var marginTop = marginBottom = Math.min(Math.round(wh * 0.075), 50); // Relative margins with a max of 50
var searchResultsMaxHeight = wh - formHeight - marginTop - marginBottom;
- var mainMenuMaxHeight = wh - $('#menuSearch').height() - $('#shareLinks').outerHeight();
+ var shareHeight = 0;
+ var sl=$('#shareLinks');
+ if (sl.length > 0) {
+ shareHeight = sl.outerHeight()
+ }
+ var menuSearchHeight = 0;
+ var ms=$('#menuSearch')
+ if (ms.length > 0) {
+ menuSearchHeight = ms.height();
+ }
+ var mainMenuMaxHeight = wh - menuSearchHeight - shareHeight;
// Search results element may not exist when resize is called
if (this.fluidbook.search.menuSearchResults == undefined) {