Commit d11f10cc by Brian Talbot

studio - course nav: corrected JS behavior of dropdowns to hide all others and…

studio - course nav: corrected JS behavior of dropdowns to hide all others and self-hide appropriately
parent 946d1617
......@@ -48,10 +48,17 @@ $(document).ready(function() {
$title = $(this).parent().find('.title');
e.preventDefault();
if ($subnav.hasClass('is-shown')) {
$subnav.removeClass('is-shown');
}
else {
$('.nav-dropdown .nav-item .title').removeClass('is-selected');
$('.nav-dropdown .nav-item .nav-sub').removeClass('is-shown');
$('.nav-dropdown .nav-item .wrapper-nav-sub').removeClass('is-shown');
$title.toggleClass('is-selected');
$subnav.toggleClass('is-shown');
$subnav.addClass('is-shown');
}
});
// toggling overview section details
......
......@@ -240,6 +240,8 @@ nav .nav-item {
left: -7px;
top: 47px;
width: 140px;
opacity: 0;
pointer-events: none;
}
.nav-sub {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment