【问题标题】:JQuery on event in meteor template流星模板中事件的jQuery
【发布时间】:2015-04-09 21:24:08
【问题描述】:

如何在流星模板中实现on 事件。

普通的jquery代码

$('.js-star-rating').on('change','input', function() {
  //Some codes
});

流星模板

Template.myTemplate.events({
// How to achieve above js code here
});

【问题讨论】:

  • 你试过类似"change .js-star-rating input": function(e){}吗?
  • 谢谢@MariusDarila。有用。将其添加到答案中

标签: javascript jquery meteor meteor-blaze


【解决方案1】:

来自http://docs.meteor.com/#/full/eventmaps

"change .js-star-rating input": function(event, tpl){}

【讨论】:

    猜你喜欢
    • 2015-05-07
    • 1970-01-01
    • 2014-10-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多