mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
help: Close other article headings on click.
This commit adds a minor improvment in clicking the left sidebar behaviour. So if you click on an article heading then other opened headings will be closed automatically. This makes the toggle experience better.
This commit is contained in:
@@ -137,6 +137,9 @@ function scrollToHash(container) {
|
||||
var $next = $(e.target).next();
|
||||
|
||||
if ($next.is("ul")) {
|
||||
// Close other article's headings first
|
||||
$('.sidebar ul').not($next).hide();
|
||||
// Toggle the heading
|
||||
$next.slideToggle("fast", "swing", function () {
|
||||
markdownPS.update();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user