mirror of https://github.com/zulip/zulip.git
/help/: Fix sidebar target bug.
This tries to toggle the next item when clicking on an <h2> in the sidebar, however we want to first check the next item is an <ul> element, so that we are collapsing or showing a list, instead of something like an <h2> which currently happens with the "#guides" element.
This commit is contained in:
parent
9c08f9417c
commit
a7f602fed6
|
@ -14,7 +14,11 @@
|
|||
};
|
||||
|
||||
$(".sidebar h2").click(function (e) {
|
||||
$(e.target).next().slideToggle('fast');
|
||||
var $next = $(e.target).next();
|
||||
|
||||
if ($next.is("ul")) {
|
||||
$next.slideToggle("fast");
|
||||
}
|
||||
});
|
||||
|
||||
$(".sidebar a").click(function (e) {
|
||||
|
|
Loading…
Reference in New Issue