Skip to content
Snippets Groups Projects
Commit 36f90710 authored by khawkins's avatar khawkins
Browse files

Enhance menu width calculation for #25

Take into account the padding on the left side of navigation area.
parent 3d4f1d13
No related branches found
No related tags found
No related merge requests found
......@@ -246,9 +246,10 @@ if (jQuery('body').hasClass('google-analytics-loaded')) {
// Clone the local menu into a mobile-only menu
// -----------
var localMenuClass = '#local-masthead .masthead > nav ul.dropdown.menu.float-left';
var localMenuWidthAvail = $('#local-masthead .masthead > nav').width();
// var localMenuClass = '#secondary-menu-links'; // for testing
// $(localMenuClass).addClass('dropdown'); // for testing
var localMenuLeftPadding = parseInt($('#local-masthead .masthead > nav ul').css('padding-left')); // account for padding of ul
var localMenuWidthAvail = $('#local-masthead .masthead > nav').width() - localMenuLeftPadding;
function localNavSpilloverMenu(changeDirection) {
var localMenuWidthUsed = 0;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment