mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-28 05:59:03 +00:00
side nav fixes
This commit is contained in:
+21
-1
@@ -177,12 +177,32 @@ const bootstrapSorts = function() {
|
||||
}
|
||||
|
||||
const bootstrapNav = function () {
|
||||
// debugger;
|
||||
// mobile nav
|
||||
// init-attaches to js object
|
||||
mlStackNav();
|
||||
// consume
|
||||
$(".js-ml-stack-nav").mlStackNav();
|
||||
|
||||
// sidenav
|
||||
$('.tree-nav .tree-nav-item').on('click', function(e) {
|
||||
// actual clicked element
|
||||
let target = e.target;
|
||||
|
||||
if (!target.href) {
|
||||
// stop it from affecting other nodes
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
// parent li rather then actual el clicked
|
||||
$(e.currentTarget).toggleClass('open');
|
||||
|
||||
$(e.target).find('>ul.tree-nav-sublist').toggleClass('hide');
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
bootstrapNav();
|
||||
bootstrapDropdowns();
|
||||
bootstrapModals();
|
||||
|
||||
Reference in New Issue
Block a user