I have an accordion list from framework7 that opens and closes immediately, after investigating I realized that there are multiple click events attached to the element, how can I remove them, there should be only on click event but there are 4, is there a way to count them and if there are more than one remove the rest,
document.addEventListener("click", function (event) {
("event is: ", event)
}, false)
the above code gives me the MouseEvent 4 times which should only be once
MouseEvent {isTrusted: true, screenX: 42, screenY: 298, clientX: 42, clientY: 195, …}
is there a way to count the number of MouseEvents and if it's more than 1 delete the rest.
any help would be appreciated.