mirror of
https://github.com/danbulant/api_docs
synced 2026-06-19 06:11:42 +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,
|
extendPage: false,
|
||||||
theme: "none",
|
theme: "none",
|
||||||
smoothScroll: false,
|
smoothScroll: false,
|
||||||
showEffectSpeed: 180,
|
showEffectSpeed: 0,
|
||||||
hideEffectSpeed: 180,
|
hideEffectSpeed: 180,
|
||||||
ignoreSelector: ".toc-ignore",
|
ignoreSelector: ".toc-ignore",
|
||||||
hashGenerator: 'pretty',
|
hashGenerator: 'pretty',
|
||||||
|
|
@ -46,7 +46,12 @@ under the License.
|
||||||
hashGenerator: function(text, element) {
|
hashGenerator: function(text, element) {
|
||||||
return element[0].getAttribute('id');
|
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([
|
setupLanguages([
|
||||||
<% if current_page.data.language_tabs %>
|
<% if current_page.data.language_tabs %>
|
||||||
<% current_page.data.language_tabs.each do |lang| %>
|
<% current_page.data.language_tabs.each do |lang| %>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue