Skip to content

Commit

Permalink
Add submenu headers
Browse files Browse the repository at this point in the history
* Putting a # in front of a list-item in a submenu makes it a submenu header
* Closes issue #21
  • Loading branch information
Dynalon committed Nov 5, 2013
1 parent d472aa6 commit d12eccf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,15 @@
ul.parent('li').addClass('dropdown');
});

// submenu headers
$('#md-menu li.dropdown').find('h1, h2, h3').each(function(i,e) {
var $e = $(e);
var text = $e.text();
var header = $('<li class="dropdown-header" />');
header.text(text);
$e.replaceWith(header);
});

// call the user specifed menu function
buildTopNav();
}
Expand Down

0 comments on commit d12eccf

Please # to comment.