This page is restricted. Please Login / Register to view this page.
jQuery(document).ready(function($) {
// Hide all sections initially
$(".content-section").hide();
// Show the Dashboard section by default
$("#dashboard").show();
// When a menu item is clicked, show the corresponding section
$(".icon-list-item").on("click", function(e) {
e.preventDefault(); // Prevent default link behavior
// Remove any previously applied classes that show sections
$("body").removeClass("show-dashboard show-profile show-leads show-clients show-files show-appointments show-settings");
// Get the target section ID from the clicked menu item's href
var targetId = $(this).attr("href").substring(1); // Get the section ID from the link (e.g., #dashboard becomes dashboard)
// Add the class corresponding to the clicked menu item to the body
$("body").addClass("show-" + targetId); // e.g., show-dashboard
// Optionally, scroll to the section (smooth scrolling)
$('html, body').animate({
scrollTop: $("#" + targetId).offset().top
}, 800);
});
});