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
|
@ -3,9 +3,12 @@
|
|||
$(function(){
|
||||
|
||||
$("ul.dropdown li").hover(function(){
|
||||
|
||||
$(this).addClass("hover");
|
||||
$('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(){
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue