Permalink
Browse files

fixed nested sub menu issue

  • Loading branch information...
1 parent 6c85997 commit df00685b756712c4025e24de035b5f39b59ca9f2 @impressivewebs committed Jun 28, 2012
Showing with 7 additions and 14 deletions.
  1. +2 −2 css/styles.css
  2. +5 −12 js/jquery.fixedTOC.js
View
@@ -48,11 +48,11 @@ a:hover, a:active, a:focus {
}
.toc-holder li li a:link, .toc-holder li li a:visited {
- padding-left: 50px;
+ padding-left: 60px;
}
.toc-holder li li li a:link, .toc-holder li li li a:visited {
- padding-left: 100px;
+ padding-left: 90px;
}
.toc-holder li a:hover {
View
@@ -57,7 +57,7 @@
top: '-' + s.tocHeight + 'px'
}, s.menuSpeed, function () {
base.$el.addClass(s.tocUpClass);
- $('.toc-sub').slideUp(0);
+ s.tocSub.slideUp(0);
});
}
@@ -69,17 +69,10 @@
doOpenItem : function () {
- $('.toc-h1>a').on('click', function () {
+ $('.toc-h1>a, .toc-sub a').on('click', function () {
- s.tocSub.each(function () {
-
- if (!$(this).hasClass('closed')) {
- $(this).stop().slideUp().addClass('closed');
- }
-
- });
-
- $(this).parent().find('.toc-sub').stop().slideToggle().removeClass('closed');
+ $(this).parent().siblings('.toc-h1').find('.toc-sub').stop().slideUp().addClass('closed');
+ $(this).next('.toc-sub').stop().slideToggle().toggleClass('closed');
return false;
@@ -168,7 +161,7 @@
topLink : $('#top-link'),
currHash : null,
// customizable settings
- menuOpens : 'click',
+ menuOpens : 'click',
scrollSpeed : 1000,
menuSpeed : 300,
useSubMenus : true,

0 comments on commit df00685

Please sign in to comment.