[jQuery] autocomplete, extraParams and $(this)
I´m a bit confused, because the following doesn´t seem to work and I
have no idea why ... after searching google for a couple of hours and
trying different solutions, I´m posting this here and hope that
someone can help.
$("input.vAutocompleteField").autocomplete('/
autocomplete_lookup/', {
highlight: false,
mustMatch: false,
matchContains: true,
cacheLength: 20,
minChars: 2,
extraParams: {
'extra_var': function() {
return $(this).attr('id');
}
}
});
"extra_var" should be the ID of the current input-field.
this is probably just me don´t seeing what´s wrong ... so any help is
appreciated.
thanks,
patrick