My test page https://osticketawesome.com/support/awesome/inc/test.html
I'm trying to combine a hamburger menu with the Sidr jQuery plugin for creating side menus.
It works perfectly in Chrome, FF, IE and Edge but in the mobile browsers I've tested (Android/Chrome and iPhone/Safari) the menu toggles but the button only animates if I tap on the outside edge of the button.
<div id="header">
<div id="right-menu" href="#right-menu">
<button href="#right-menu" class="c-hamburger c-hamburger--htx">
<span>toggle menu</span>
</button>
</div>
</div>
$(document).ready(function() {
var toggles = document.querySelectorAll(".c-hamburger");
for (var i = toggles.length - 1; i >= 0; i--) {
var toggle = toggles[i];
toggleHandler(toggle);
};
function toggleHandler(toggle) {
toggle.addEventListener( "click", function(e) {
e.preventDefault();
(this.classList.contains("is-active") === true) ?
this.classList.remove("is-active") :
this.classList.add("is-active");
});
}
$('.c-hamburger').sidr({
name: 'right_menu',
side: 'right',
body: 'container'
});
})();
Any ideas?