Skip to content
This repository was archived by the owner on Nov 10, 2020. It is now read-only.

Commit e99f6b5

Browse files
committed
Improve auto-toggling to remove animation on load.
1 parent 15ea26d commit e99f6b5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

_assets/js/swift-site.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ $(function() {
2222
$(repl).remove();
2323
}
2424
});
25-
26-
// doing the auto-expand cancels the linking above, commence afterward
27-
if (shouldExpandAll) expandAll(true);
2825
}});
2926

3027
// link non-synxtaxhighlighter sections
@@ -92,6 +89,12 @@ $(function() {
9289
if (ev.which == 65) expandAll(!shouldExpandAll);
9390
});
9491

92+
// expand all by default if preference set
93+
if (shouldExpandAll) {
94+
$('#content .collapse').addClass('in');
95+
$('#toggleDescriptions,#toggleDescriptionsNav').html('Collapse all');
96+
}
97+
9598
// hide inherited
9699
var inheritedCount = $('.inherited').length;
97100
var hideInherited = function(bn) {

0 commit comments

Comments
 (0)