.sidebar-pin-btn to .js-pinSidebar
Some checks failed
Build and Push Docker Image / build (push) Failing after 7m2s
Some checks failed
Build and Push Docker Image / build (push) Failing after 7m2s
This commit is contained in:
parent
7705ff1fcb
commit
2571630c41
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user