Hi i'm using keenthemes v8 demo 1 . i've implemented menu now i want to check if the dropdown is open or not ? .
need a function which will auto trigger on menu hide or show just like in the dropdowns of bootstrap looking for a similar function in metronic can't find anything on the documentation on menu
need this function :
var myDropdown = document.getElementById('myDropdown')
myDropdown.addEventListener('show.bs.dropdown', function () {
// do something...
})
Hi,
If you are using Bootstrap Dropdown please refer to it's official documentation here.
var dropdownToggle = document.getElementById("myDropdown");
if (dropdownToggle.classList.contains("show)) {
alert("It is shown");
}
no i'm using keenthemes menu component
Hi,
Please refer to the new KTMenu documentation here.
var item = document.querySelector("#kt_menu_item");
var isShown = menu.isItemSubShown(item);