Skip to content

Commit 7d2881f

Browse files
author
Joseph Lowinske
committed
revert to expand top level nav items only if on v2.1 docs
1 parent ad9fb99 commit 7d2881f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

_includes/sidebar.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,19 @@
3939
}
4040
};
4141

42-
$('#mysidebar .tier-1').addClass('active--expand');
42+
{% if page.version.version == 'v2.1' %}
43+
if ($(window).width() >= 992) {
44+
$('#mysidebar .tier-1').addClass('active--expand');
45+
}
46+
47+
$(window).on('resize', function() {
48+
if ($(window).width() > 992) {
49+
$('#mysidebar .tier-1>ul').slideDown(0);
50+
} else {
51+
$('#mysidebar .tier-1>ul').slideUp(0);
52+
}
53+
});
54+
{% endif %}
4355

4456
function closeVersionSwitcher() {
4557
$('#version-switcher .tier-1 ul').slideUp();

0 commit comments

Comments
 (0)