Flat-UI ( http://designmodo.github.io/Flat-UI/ ) を使用して、構築中の小さな MeteorJS アプリのフロントエンド要素を支援しています。
私が抱えている問題は、選択ボックスがクリックされたときにイベントをキャプチャできないことです。
Template.selector.rendered = function() {
Deps.autorun(function(){
$('.selectpicker').selectpicker({
style: 'btn-info col-md-4',
menuStyle: 'dropdown-inverse'
});
});
};
Template.selector.events({
'click .dropdown-menu ul li': function(evt){
var value = $(evt.target).val();
var oldVal = Session.get('currentIndustry');
console.log(evt);
console.log(value);
if(value != oldVal) {
alert("CALLING ALL DA THANGS!");
}
Session.set("currentIndustry", value);
}
})
私のイベント オブジェクトでは、何も起こりません。