diff --git a/apps/home/static/home/js/index.js b/apps/home/static/home/js/index.js index 4830171..49e11aa 100644 --- a/apps/home/static/home/js/index.js +++ b/apps/home/static/home/js/index.js @@ -232,13 +232,13 @@ $(window).on('resize', () => { // region Sidebar Pin -var _sidebarPinned = $(".sidebar .sidebar-pin-btn").hasClass("active"); +var _sidebarPinned = $(".js-pinSidebar").hasClass("active"); const getSidebarPinned = () => _sidebarPinned; const setSidebarPinned = pin => { _sidebarPinned = pin; // Show button as active or not - const btn = $(".sidebar .sidebar-pin-btn"); + const btn = $(".js-pinSidebar"); pin ? btn.addClass("active") : btn.removeClass("active"); $(".sidebar .btn-close").prop("disabled", pin); @@ -247,4 +247,4 @@ const setSidebarPinned = pin => { const toggleSidebarPinned = () => setSidebarPinned(!getSidebarPinned()); // User controls for pinning the sidebar -$(".sidebar .sidebar-pin-btn").on("click", toggleSidebarPinned); +$(".js-pinSidebar").on("click", toggleSidebarPinned);