mirror of
https://github.com/danbulant/api_docs
synced 2026-05-19 04:08:40 +00:00
Add hack to prevent tocify from animating on page load
This commit is contained in:
parent
d3ab3cc4b7
commit
198484ef2b
1 changed files with 7 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ under the License.
|
|||
extendPage: false,
|
||||
theme: "none",
|
||||
smoothScroll: false,
|
||||
showEffectSpeed: 180,
|
||||
showEffectSpeed: 0,
|
||||
hideEffectSpeed: 180,
|
||||
ignoreSelector: ".toc-ignore",
|
||||
hashGenerator: 'pretty',
|
||||
|
|
@ -46,7 +46,12 @@ under the License.
|
|||
hashGenerator: function(text, element) {
|
||||
return element[0].getAttribute('id');
|
||||
}
|
||||
});
|
||||
}).data("toc-tocify");
|
||||
// Hack to make already open sections to start opened,
|
||||
// instead of displaying an ugly animation
|
||||
setTimeout(function() {
|
||||
toc.setOption("showEffectSpeed", 180);
|
||||
},50);
|
||||
setupLanguages([
|
||||
<% if current_page.data.language_tabs %>
|
||||
<% current_page.data.language_tabs.each do |lang| %>
|
||||
|
|
|
|||
Loading…
Reference in a new issue