I have a class of textboxes and trying to attach onChange event to the class. Code below works and i get the output from calData in firefox but does not work on Chrome
enter code here
<ul id="week_list">
<li id="34">
Week 1 - <input class="test_class" type="number" id="week_34" name="week[]">
</li>
<li id="35">
Week 2 - <input class="test_class" type="number" id="week_35" name="week[]">
</li>
</ul>
//Javascript
var Test =
{
init: function(config) {
this.bindEvents();
},
bindEvents: function() {
this.config.clTest.on('change',this.calData);
},
calData: function(){
console.log("calculating");
},
};
Test.init({
clTest: $('.test_class'),
});