2013-03-31 55 views
0

事件,我在我的项目中使用流星,我有以下click事件:点击Chrome浏览器(iPad版)

Template.Products.events = { 
    "click .Product" : function() { 
     if(this.InStock) { 
     var item = Cart.findOne({Name : this.Name, Price : this.Price}); 
     if(item) { 
       Cart.update(item._id, { $inc : {Quantity : 1} }); 
     } else { 
       Cart.insert({ Name : this.Name, Price : this.Price, Quantity : 1 }); 
     } 
     } else { 
     alert("That item is not in stock"); 
     } 
    } 
    }; 

然而,它并没有在Chrome浏览器(iPad版)的工作。

回答

0

您应该使用touchstart事件而不是click事件。

相关问题