Is there a way to use jQuery to add hover effects on apple touch devices for my navigation bar?
I've tried using what I have so far, but it doesn't seem to be working. Has anyone had success with this before?
<script>
$(document).ready(function() {
//iPad and iPhone fix
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
$("#primary-navigation li a").bind('touchstart', function(){
console.log("Touch started");
});
$("#primary-navigation li a").bind('touchend', function(){
console.log("Touch ended");
});
}
});
</script>
I decided to add an alert right before my selectors and it seems to be working...