Server : Apache System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64 User : nobody ( 99) PHP Version : 8.1.23 Disable Function : NONE Directory : /home/dnlcambodia/public_html/dnl_dashboard/assets/js/ |
$(document).ready(function() { // Function to load content and update the active menu item function loadContent(page, menuItem) { $('.content').load('includes/' + page); $('.nav-menu li').removeClass('active'); // Remove the 'active' class from all menu items menuItem.addClass('active'); // Add the 'active' class to the clicked menu item } // Load the "Contact" content by default loadContent('contact.php', $('#contact')); // Handle menu item clicks $('#contact').click(function() { loadContent('contact.php', $(this)); }); $('#company').click(function() { loadContent('company.php', $(this)); }); $('#social-media').click(function() { loadContent('social-media.php', $(this)); }); });