Difference between revisions of "Template:Pitt"
Line 28: | Line 28: | ||
$("#menuContainer > ul > li:has(ul)").children("ul").each(function(){ | $("#menuContainer > ul > li:has(ul)").children("ul").each(function(){ | ||
− | var | + | var padding = parseInt($(this).parent().css("padding-left")) + parseInt($(this).parent().css("padding-right")); |
+ | var newWidth = parseInt($(this).parent().css("width")) + padding; | ||
if (newWidth > parseInt($(this).css("width"))){ | if (newWidth > parseInt($(this).css("width"))){ | ||
$(this).css("width", newWidth + 'px'); | $(this).css("width", newWidth + 'px'); | ||
+ | } else { | ||
+ | $(this).parent().css("width", (parseInt($(this).css("width")) - padding) +'px'); | ||
} | } | ||
}); | }); |
Revision as of 01:15, 22 May 2015