I have a button with a:hover effect, but I want to disable hover on iPad and iPhone. It's not working.
$(document).ready(function () {
$(".content").hide();
$(".open1").click(function () {
$(this).next().slideToggle(400);
if('ontouchstart' in document){$('#btn_01').unbind('mouseenter mouseleave');}
var btn = $('#btn_01'), isOn = btn.hasClass('on');
if(isOn) { btn.removeClass('on'); }
else if(btn) { btn.addClass('on'); }
});
});
<style type="text/css">
#btn_01{width:510px; height:109px; background:url('images/btn_01_on.png') no-repeat;}
#btn_01:hover{width:510px; height:109px; background:url('images/btn_01_over.png') no-repeat;}
#btn_01.on{width:510px; height:109px; background:url('images/btn_01_over.png') no-repeat;}