Last active
August 29, 2015 14:07
-
-
Save singerxt/39ecc32967c71a64eba4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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