1. 程式人生 > >關於IOS不能使用JQUERY的ON事件

關於IOS不能使用JQUERY的ON事件

$(document).on('click','.a .b',function(){
var id=$(this).attr('id');
if(id){
window.location.href="{WEB_PATH}/mobile/mobile/item/"+id;
}
}); 

將click 改成 click touchstart

$(document).on('click touchstart','.a .b',function(){
var id=$(this).attr('id');
if(id){
window.location.href="{WEB_PATH}/mobile/mobile/item/"
+id; } });