I have a button as such:
Within jQuery I am using the following, but it still
What I found out was old but working solution on modern browsers. Works for not toggling classes on the double click.
$('*').click(function(event) {
if(!event.detail || event.detail==1){//activate on first click only to avoid hiding again on double clicks
// Toggle classes and do functions here
$(this).slideToggle();
}
});