Skip to content

Commit 4c73c21

Browse files
collapse other open subsections of a section
1 parent 17e86fd commit 4c73c21

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

js/frame.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@
8888
$('input[type="button"][data-current!="chart"].show-chart-toggle').trigger('click');
8989
});
9090

91+
// collapse other open subsections of this section
92+
$('.viz-section-title').click(function () {
93+
var grandparent = $(this).parent().parent();
94+
grandparent.find('.viz-section-title.open ~ .viz-section-items').hide();
95+
grandparent.find('.viz-section-title.open').removeClass('open');
96+
});
97+
9198
$('#view-remote-file').click(function () {
9299
var url = $(this).parent().find('#remote-data').val();
93100

0 commit comments

Comments
 (0)