Skip to content
Create a gist now

Instantly share code, notes, and snippets.

var _that = this;
someFunction: function(onSomeEvent) {
var variable = 'some text';
onSomeEvent.apply(_that); // how to pass current scope variables/functions to this function?
return null;
function _someMethod(arg) {
console.log(this.variable); // or console.log(variable);
console.log(this._someMethod(1)); // or jQuery.someFunction._someMethod(2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.