[jQuery] Ajax - Access data arguments in callback
Hello,
Is it possible to access the data arguments that are sent with the
ajax function?
Example:
$('#mycheckbox').click( function() {
$.get( '/ajax.php', { nr: this.id }, function( data, textStatus ) {
// Here I want to access the arguments I just sent with ajax.php
// As example, something like this:
$('#'+arguments.nr).attr('checked', 'checked');
} );
return false;
} );
I could easily do $('#mycheckbox').attr('checked', 'checked'); but
that is not what I want. Also I don't want to send the arguments with
the response. Anyone knows a solution? I can't find it in the
documentation of jQuery and not in the discussions here.