I'm trying to access method2 from within my each function. I'm getting the following error. How do I get this to work?
ReferenceError: method2 is not defined
method1: function() {
$('tr[data-quantity]').each(function(value) {
this.method2(value);
})
},
method2: function(value) {
console.log('test')
},