Change More hiding/showing to CSS class from explicit block/none.
When theme wants to use something else than display: block; the old method did not work.
This commit is contained in:
@@ -2297,7 +2297,7 @@ function menuResize()
|
|||||||
for (var i = hide_start; i < li.length-1; i++) {
|
for (var i = hide_start; i < li.length-1; i++) {
|
||||||
$(li[i])[more_shown ? 'prependTo' : 'appendTo'](submenu_ul);
|
$(li[i])[more_shown ? 'prependTo' : 'appendTo'](submenu_ul);
|
||||||
}
|
}
|
||||||
submenu.show();
|
submenu.addClass('shown');
|
||||||
} else if (more_shown) {
|
} else if (more_shown) {
|
||||||
w -= submenu_w;
|
w -= submenu_w;
|
||||||
// nothing hidden, maybe something can be restored
|
// nothing hidden, maybe something can be restored
|
||||||
@@ -2308,7 +2308,7 @@ function menuResize()
|
|||||||
if (w+submenu_w < wmax || (i == li2.length-1 && w < wmax)) {
|
if (w+submenu_w < wmax || (i == li2.length-1 && w < wmax)) {
|
||||||
$(li2[i]).insertBefore(submenu);
|
$(li2[i]).insertBefore(submenu);
|
||||||
if (i == li2.length-1) {
|
if (i == li2.length-1) {
|
||||||
submenu.hide();
|
submenu.removeClass('shown');
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -2349,8 +2349,7 @@ $(function() {
|
|||||||
if ($(this).find('ul .tabactive').length == 0) {
|
if ($(this).find('ul .tabactive').length == 0) {
|
||||||
$(this).removeClass('submenuhover').find('> a').removeClass('tabactive');
|
$(this).removeClass('submenuhover').find('> a').removeClass('tabactive');
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
.hide();
|
|
||||||
topmenu.append(submenu);
|
topmenu.append(submenu);
|
||||||
|
|
||||||
// populate submenu and register resize event
|
// populate submenu and register resize event
|
||||||
|
@@ -692,6 +692,10 @@ ul#topmenu ul a {
|
|||||||
|
|
||||||
ul#topmenu .submenu {
|
ul#topmenu .submenu {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
ul#topmenu .shown {
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul#topmenu ul {
|
ul#topmenu ul {
|
||||||
|
@@ -667,6 +667,10 @@ ul#topmenu ul a {
|
|||||||
|
|
||||||
ul#topmenu .submenu {
|
ul#topmenu .submenu {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
ul#topmenu .shown {
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul#topmenu ul {
|
ul#topmenu ul {
|
||||||
|
Reference in New Issue
Block a user