【发布时间】:2014-01-23 13:03:50
【问题描述】:
我有一个按钮。
<button type="button" id="mybutton" class="btn btn-success">Send</button>
我的 client/client.js 中的“点击”功能
Template.index.events({
'click #mybutton' : function () {
// template data, if any, is available in 'this'
Meteor.call('voteMe', some parameters, function(error,result){
if (error){
console.log(error);
}
else{
console.log(result);
}
});
$(".testing").css({'display':'none'});
$(".voted").css({'display':'block'});
},
//Here some other functions
它可以工作,但是在 android 4.1.2 浏览器上它不调用“voteMe”函数,但是这些行可以工作
$(".testing").css({'display':'none'});
$(".voted").css({'display':'block'});
谢谢。
【问题讨论】:
-
浏览器控制台有什么东西吗?您确定它是从
click函数执行 jQuery 而不是在其他地方实现相同的效果吗? -
我在使用 Meteor 0.8.0 时遇到了类似的问题,在 Android 浏览器上从未调用 Meteor.call 回调函数(它在同一设备上的 Chrome 中工作) - 你有没有找到解决方案?
标签: android twitter-bootstrap meteor