Server IP : 111.118.215.189 / Your IP : 3.17.181.199 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home1/a1673wkz/propstonerealty.com/js/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
//toggle between hiding and showing the dropdown content function myFunction() { document.getElementById("myDropdown").classList.toggle("show"); } // Closes dropdown window.onclick = function(event) { if (!event.target.matches('.dropbtn')) { var dropdowns = document.getElementsByClassName("dropdown-content"); var i; for (i = 0; i < dropdowns.length; i++) { var openDropdown = dropdowns[i]; if (openDropdown.classList.contains('show')) { openDropdown.classList.remove('show'); } } } } // Sidebar Menu Script $.sidebarMenu = function(menu) { var animationSpeed = 300; $(menu).on('click', 'li a', function(e) { var $this = $(this); var checkElement = $this.next(); if (checkElement.is('.treeview-menu') && checkElement.is(':visible')) { checkElement.slideUp(animationSpeed, function() { checkElement.removeClass('menu-open'); }); checkElement.parent("li").removeClass("active"); } //If the menu is not visible else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) { //Get the parent menu var parent = $this.parents('ul').first(); //Close all open menus within the parent var ul = parent.find('ul:visible').slideUp(animationSpeed); //Remove the menu-open class from the parent ul.removeClass('menu-open'); //Get the parent li var parent_li = $this.parent("li"); //Open the target menu and add the menu-open class checkElement.slideDown(animationSpeed, function() { //Add the class active to the parent li checkElement.addClass('menu-open'); parent.find('li.active').removeClass('active'); parent_li.addClass('active'); }); } //if this isn't a link, prevent the page from being redirected if (checkElement.is('.treeview-menu')) { e.preventDefault(); } }); } $.sidebarMenu($('.sidebar-menu'))