diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 5f35f627..ad4cd4de 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -3,6 +3,7 @@
+
{{ range .Site.Params.custom_js }}
diff --git a/static/js/hugo-academic.js b/static/js/hugo-academic.js
index e2988c22..5881870d 100644
--- a/static/js/hugo-academic.js
+++ b/static/js/hugo-academic.js
@@ -94,19 +94,20 @@
* --------------------------------------------------------------------------- */
var $container = $('#container-projects');
+ $container.imagesLoaded(function () {
+ // Initialize Isotope after all images have loaded.
+ $container.isotope({
+ itemSelector: '.isotope-item',
+ layoutMode: 'masonry'
+ });
- // Initialize Isotope.
- $container.isotope({
- itemSelector: '.isotope-item',
- layoutMode: 'masonry'
- });
-
- // Filter items when filter link is clicked.
- $('#filters a').click(function () {
- var selector = $(this).attr('data-filter');
- $container.isotope({filter: selector});
- $(this).removeClass('active').addClass('active').siblings().removeClass('active all');
- return false;
+ // Filter items when filter link is clicked.
+ $('#filters a').click(function () {
+ var selector = $(this).attr('data-filter');
+ $container.isotope({filter: selector});
+ $(this).removeClass('active').addClass('active').siblings().removeClass('active all');
+ return false;
+ });
});
/* ---------------------------------------------------------------------------