From 18683913291e4031cd87da673de14db4205320d0 Mon Sep 17 00:00:00 2001 From: wgroeneveld Date: Mon, 13 Apr 2020 15:52:21 +0200 Subject: [PATCH] on ajaxcomplete resize bar --- static/js/codex.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/static/js/codex.js b/static/js/codex.js index ecc23b8..2dc8acd 100644 --- a/static/js/codex.js +++ b/static/js/codex.js @@ -62,14 +62,19 @@ $(function() { $('.sidebar-game-info').mouseenter(animate).mouseleave(inanimate); }; + var resizeSidebar = function() { + const height = document.querySelector('.content-column').clientHeight; + $('.sidebar-content').css('height', (height + 50) + 'px'); + }; + animateActiveGameImagesIfFound(); setSideBarPlatformHeight(); addRandomImageToSideBarMenus(); enableScrollToTopOnInternalLinks(); enableLightboxOnClickImgInContent(); disableResponsiveImagesForInlineLis(); + resizeSidebar(); - const height = document.querySelector('.content-column').clientHeight; - $('.sidebar-content').css('height', (height + 50) + 'px'); + $(document).bind("ajaxComplete", resizeSidebar); });