mirror of
https://github.com/placeholder-soft/prodigyapi.git
synced 2026-01-12 22:44:57 +08:00
Update tocify to recache headers on image load, fixes #293
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
7
source/javascripts/lib/_imagesloaded.min.js
vendored
Normal file
7
source/javascripts/lib/_imagesloaded.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user