mirror of
https://github.com/placeholder-soft/prodigyapi.git
synced 2026-04-30 12:51:48 +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_ui
|
||||||
//= require ../lib/_jquery.tocify
|
//= require ../lib/_jquery.tocify
|
||||||
|
//= require ../lib/_imagesloaded.min
|
||||||
(function (global) {
|
(function (global) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -37,14 +38,18 @@
|
|||||||
|
|
||||||
// Hack to make already open sections to start opened,
|
// Hack to make already open sections to start opened,
|
||||||
// instead of displaying an ugly animation
|
// instead of displaying an ugly animation
|
||||||
function animate () {
|
function animate() {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
toc.setOption('showEffectSpeed', 180);
|
toc.setOption('showEffectSpeed', 180);
|
||||||
}, 50);
|
}, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(makeToc);
|
$(function() {
|
||||||
$(animate);
|
makeToc();
|
||||||
|
animate();
|
||||||
|
$('.content').imagesLoaded( function() {
|
||||||
|
global.toc.calculateHeights();
|
||||||
|
});
|
||||||
|
});
|
||||||
})(window);
|
})(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