Update tocify to recache headers on image load, fixes #293

This commit is contained in:
Robert Lord
2015-07-06 18:54:45 -07:00
parent ae3d50277e
commit ad3b2769fe
2 changed files with 16 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
//= require ../lib/_jquery_ui
//= require ../lib/_jquery.tocify
//= require ../lib/_imagesloaded.min
(function (global) {
'use strict';
@@ -37,14 +38,18 @@
// Hack to make already open sections to start opened,
// instead of displaying an ugly animation
function animate () {
function animate() {
setTimeout(function() {
toc.setOption('showEffectSpeed', 180);
}, 50);
}
$(makeToc);
$(animate);
$(function() {
makeToc();
animate();
$('.content').imagesLoaded( function() {
global.toc.calculateHeights();
});
});
})(window);

File diff suppressed because one or more lines are too long