modified js to set submenu width based on width top level ul
This commit is contained in:
parent
09c2f33633
commit
91db1ad147
1 changed files with 5 additions and 2 deletions
|
@ -2,10 +2,13 @@
|
||||||
|
|
||||||
$(function(){
|
$(function(){
|
||||||
|
|
||||||
$("ul.dropdown li").hover(function(){
|
$("ul.dropdown li").hover(function(){
|
||||||
|
|
||||||
$(this).addClass("hover");
|
$(this).addClass("hover");
|
||||||
$('ul:first',this).css('visibility', 'visible');
|
$('ul:first',this).css('visibility', 'visible');
|
||||||
|
if ( $('ul.dropdown').width() > 88 ) {
|
||||||
|
$('ul:first li',this).css('width', ($("ul.dropdown").width() - 22) + 'px');
|
||||||
|
}
|
||||||
|
$("ul.dropdown ul.sub_menu li:last-child").css('width', ($("ul.dropdown").width() - 14) + 'px');
|
||||||
|
|
||||||
}, function(){
|
}, function(){
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue