ist es obligatorisch, es so zu binden ... ??
Template.templateOne.events({
'click #slider': function(){
console.log('event works!');
}
});
Ich glaube, Sie es wie folgt tun:
var noui = document.getElementById('#slider');
noui.noUiSlider.on('slide', function(){
console.log('i think it will work');
});
ok dann mach es wie dieses
Template.templateOne.rendered = function() {
var slider = document.getElementById('#slider')
this.slider.noUiSlider({
start: Session.get("slider"),
connect: true,
range: {
'min': 0,
'max': 100
}
}).on('slide', function (ev, val) {
console.log('i think it will work');
Session.set('slider', val);
}).on('change', function (ev, val) {
// round off values on 'change' event
Session.set('slider', [Math.round(val[0]), Math.round(val[1])]);
});
};
Sie in diesem Beispiel sehen kann https://github.com/rcy/meteor-nouislider/blob/master/example/example.js
ist es zwingend notwendig, um bind es so ... ?? –