If I have a function:
function doSomething() {
///
}
I can use this with .change as follows:
$("input[name='bla']").change(doSomething);
However, what if the function was:
function doSomething(bla) {
///
}
And I wanted to pass "this" as a parameter to the function? This doesn't seem to work:
$("input[name='bla']").change(doSomething(this));
Any ideas?
UPDATE
I do not want this:
$('a.link').change(function (e) { doSomething($(this)); } );
I want this: (but the correct syntax that will work)
$('a.link').change( doSomething($(this)) );