I'm using this to hide/show a menu on small screen touch devices:
$('.menuButton').bind('touchstart',function(e){
e.preventDefault();
$('nav.mainNav ul li').toggle();
});
It appears to be firing twice on iphone, quickly displaying and disappearing again. This only the first time, works perfectly after that.
Any ideas? Thanks
It might be you have some code getting triggered too, somewhere out of sight. Other problem could be that you have css-ed the
nav.mainNav ul li
with!important
, than the animation works and hops back to the value of the important