Commit 198484ef authored by Robert Lord's avatar Robert Lord

Add hack to prevent tocify from animating on page load

parent d3ab3cc4
......@@ -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| %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment