have you tried 

$("a").ajax(options);

});

? Seems to me like that should work.

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of alife
Sent: Friday, November 09, 2007 8:17 AM
To: jQuery (English)
Subject: [jQuery] chainable ajax() - request


hello!

I want to use the ajax() - method without losing the actual clicked object.
do you have a solution for my problem?

To give an example:

------------------------------------

$("a").click(function(){

// now I have the possibility to use load, but I need the ajax - method,
because I don't want to add anything into the clicked object, I want to load
a script...

$(this).load("ajax.php", {var = lala} , function(){...}); // ... with this
method I could get "this"

/*
$.ajax({
                        type:           "POST",
                        url:            "ajax.php",
                        data:           "var=lala",
                        dataType:       "script",
                        success: function(msg){
                        alert( this );
  });

//with this method I lose "this", and can't access the clicked objects

what I'd need is

$("a").ajax(options);

});
------------------------------------

Do you understand my problem?

Thank you for your help,
alife


Reply via email to