Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Commit

Permalink
Fix: Broken site-nav children menu #8
Browse files Browse the repository at this point in the history
  • Loading branch information
yoarts authored and j4ckielord committed Mar 18, 2014
1 parent a064a1d commit d938a63
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion assets/css/template.css

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions assets/js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@
$(this).toggleClass('open').next('#site-navigation').slideToggle(300);
});

$('#site-navigation .sub-menu').before('<i class="fa fa-caret-right"></i>');
$('#site-navigation .children').before('<i class="fa fa-caret-right"></i>');
$('#site-navigation .sub-menu, #site-navigation .children').before('<i class="fa fa-caret-right"></i>');

if(!!('ontouchstart' in window)){
$('#site-navigation .menu-item-has-children .fa').click(function() {
$('#site-navigation .menu-item-has-children .fa, #site-navigation .page_item_has_children .fa')
.click(function() {
$(this).toggleClass('open').next('ul').slideToggle(300);
});
} else {
$('#site-navigation .menu-item-has-children').not('.current-menu-parent').not('.current-menu-ancestor').hover(function() {
$('#site-navigation .menu-item-has-children, #site-navigation .page_item_has_children')
.not('.current-menu-parent, .current_page_parent, .current_page_ancestor, .current-menu-ancestor')
.hover(function() {
$(this).children('.fa').toggleClass('open').next('ul').stop(true, true).slideToggle(300);
});
}
Expand Down
12 changes: 9 additions & 3 deletions assets/less/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -571,12 +571,17 @@ input#submit {

.current-menu-item,
.current-menu-parent,
.current-menu-ancestor {
.current-menu-ancestor,
.current_page_item,
.current_page_parent,
.current_page_ancestor {
> a { color: rgba(255,255,255,.5) }
}

.current-menu-parent,
.current-menu-ancestor {
.current-menu-ancestor,
.current_page_parent,
.current_page_ancestor {
> .fa {
.rotate(90deg);

Expand All @@ -585,7 +590,8 @@ input#submit {
}
}

> .sub-menu {
> .sub-menu,
> .children {
display: block;
}
}
Expand Down
2 changes: 2 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ Icon Fonts: Font Awesome
Changelog
----
1.2.10
* Fix: Broken site-nav children menu
* Tweak: Buttons, Input, Alert style

1.2.9
* Add: Option to use both title & logo
* Fix: Dropdown menu bug: http://wordpress.org/support/topic/dropdown-menu-bug

1.2.8
Expand Down

0 comments on commit d938a63

Please sign in to comment.