I've searched this here, and I found a few answers but none of them worked for me.
As told in the title, I want to apply a function to a variable.
This is what I have:
var someVar = $('.class');
function runFunction() {
someVar.css( ... styles here ... );
}
someVar.runFunction();
It only works if I replace 'someVar.runFunction();' with 'runFunction();'.
Your help will be appreciated :)