Skip to content

Instantly share code, notes, and snippets.

@singerxt singerxt/test.js
Last active Aug 29, 2015

Embed
What would you like to do?
var object = {
method: function () {
console.log('foo');
},
method2: function () {
var that = this;
$('.button').on('click', function () {
that.method();
});
}
}
var object = {
method: function () {
console.log('foo');
},
method2: function () {
$('.button').on('click', function () {
object.method();
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.