Skip to content

Commit

Permalink
Genericized the handling of headers in mega menu (changed handling of…
Browse files Browse the repository at this point in the history
… h4 to h3, h4).
  • Loading branch information
Paul Jackson authored and Paul Jackson committed Jul 3, 2012
1 parent d84c9dc commit ceb2fd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/workers/menubar.js
Expand Up @@ -303,7 +303,7 @@
timeout: 500
});
/* now recurse all focusable to be able to navigate */
$childmenu.find("h4 a").each(function (i) {
$childmenu.find("h3 a, h4 a").each(function (i) {
$(this).addClass("knav-" + index + "-" + (i + 1) + "-0");
$(this).parent().next("ul").find("a").each(function (j) {
$(this).addClass("knav-" + index + "-" + (i + 1) + "-" + (j + 1));
Expand All @@ -312,7 +312,7 @@
return;
});
$childmenu.find("ul").not(function () {
return ($(this).prev("h4").length === 0 || $(this).parent('li').length === 0);
return ($(this).prev("h3, h4").length === 0 || $(this).parent('li').length === 0);
}).find("a").each(function (i) {
$(this).addClass("knav-" + index + "-0-" + (i + 1));
});
Expand Down

0 comments on commit ceb2fd2

Please sign in to comment.