I am trying to bind values to a function in a loop. How can I access the binded values in the function?
// ansswer number is is different each time
btn.find("a").data(this.key, option.slide).bind("click", this._continueOnClick.bind(answerNumber));
Now from the function _continueOnClick
, how can I actually access the value of answerNumber
?
The function:
_continueOnClick: function (e) {
console.log(answerNumber); //fails
}