Skip to content

Commit

Permalink
Given functionality of sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
SiddarthaKarri committed Oct 10, 2024
1 parent 07f9176 commit 9745a23
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,22 @@ window.onload = () => {
themeToggle.checked = true;
}
};
// Toggle the sidebar visibility
function toggleSidebar() {
const sidebar = document.querySelector('.social-sidebar');
const toggleArrow = document.querySelector('.toggle-arrow');

// Check if the sidebar is currently visible
if (sidebar.style.display === "none") {
// If hidden, show the sidebar and hide the toggle arrow
sidebar.style.display = "block";
toggleArrow.style.display = "none";
} else {
// If visible, hide the sidebar and show the toggle arrow
sidebar.style.display = "none";
toggleArrow.style.display = "block";
}
}



0 comments on commit 9745a23

Please sign in to comment.