summaryrefslogtreecommitdiff
path: root/themes/flog/layouts/partials/listing.html
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2016-10-23 19:05:55 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2016-10-23 19:05:55 +0200
commit9859f7b262c286f689f1065885c9b0e44b940871 (patch)
tree6d8bac6e6be4506ea1c0a5fcc5a423e79d99de44 /themes/flog/layouts/partials/listing.html
parent852c45a1f50304cade98b4afeee15ec1fdc81268 (diff)
downloadpragblog-9859f7b262c286f689f1065885c9b0e44b940871.tar.gz
pragblog-9859f7b262c286f689f1065885c9b0e44b940871.zip
use a library for image onload events
Diffstat (limited to 'themes/flog/layouts/partials/listing.html')
-rw-r--r--themes/flog/layouts/partials/listing.html4
1 files changed, 1 insertions, 3 deletions
diff --git a/themes/flog/layouts/partials/listing.html b/themes/flog/layouts/partials/listing.html
index a5556b6..c652294 100644
--- a/themes/flog/layouts/partials/listing.html
+++ b/themes/flog/layouts/partials/listing.html
@@ -59,9 +59,7 @@
function loadMasonry() {
if (typeof imageLoadAttached === 'undefined') {
imageLoadAttached = true;
- [].forEach.call(document.images, function(i) {
- i.addEventListener('load', loadMasonry, false);
- });
+ imagesLoaded(document.body).on('always', loadMasonry)
}
if (typeof Masonry === 'undefined') {