What i'm trying to accomplish works perfectly on Chrome -- Android 4.1 But fails pretty hard on iOS.
$(document).on('mouseenter touchend','[id*=mmlink]', function (e) {
var $btn = $(this);
var href = $btn.attr('href');
var count = ($btn.data('click_count') || 0) + 1;
$btn.data('click_count', count);
if (count == 1) {
$btn.click(function(v) {
v.preventDefault();
});
} else {
document.location.href = href;
}
});
I use milonic menu to generate sub menus. I need to use .on()
to select the submenus.
test page: http://www.wolfbariatrics.com/mmtest/index.htm
I'm thinking there is another event that only happens in iOS. Remote Debugger for safari allows me to set breakpoints but as soon as I step in or over it follows the anchor tag.
I've gone as far as removing all events from the anchor tag entirely and the href but still nothing works.