• Please note that our support is not available weekly from : Thursday 15:00 (GMT+2) to Saturday 13:00 (GMT+2)

Resolved stickyMojo error when hiding breadcrumb

New Member

When hiding the breadcrumb on forum home in [Doh Theme] --> General style settings, or when hiding the bottom breadcrumb on the same settings page, there is an error on page load indicating that function 'top' is undefined for settings.footerID.offset() in stickyMojo.js. This is because, on page load, you are injecting:

$('.sidebar').stickyMojo({footerID: '.breadBoxBottom', contentID: '.mainContainer'});

however the style .breadBoxBottom is set as 'display: none;' when the bottom breadcrumb or the forum home breadcrumb is disabled. As you may know, jQuery cannot read the top (or any) value of offset() when the element being called is display:none, hence why 'top' is undefined.

Since I don't use sticky sidebars, I simply disabled the "Sticky Sidebar" option in [Doh Theme] --> Sidebar which of course resolves the problem since the xen:if block that contains the offending code above does not execute. But for those users of yours who do use sticky sidebar, I would wrap the .breadBoxBottom element in another div (like .breadBoxBottomContainer) and call this instead, which should resolve the error since you're no longer setting a value that's display:none if the user hides the breadcrumb on forum home, or the bottom breadcrumb all together :

$('.sidebar').stickyMojo({footerID: '.breadBoxBottomContainer', contentID: '.mainContainer'});
New Member
I'm still getting this, or a similar issue:

Uncaught TypeError: Cannot read property 'top' of undefined
    at calculateLimits (stickyMojo.js:64)
    at stick (stickyMojo.js:105)
    at dispatch (jquery-1.11.0.min.js:3)
    at r.handle (jquery-1.11.0.min.js:3)