I know I can use the following, and it will work, but is there
something similar in jQuery that's already available?

$('a').click(function() {
 a = this;
 $.ajax({
   url: this.href,
   success: function(data) {
     alert(a.href);
   }
 })
});


That's the way people do it in jQuery, although often people will use the variable "self" or "that". AFAIK there isn't a specific method in jQuery to do what you are referring to. Also you might want to do "var a = this" so that it doesn't conflict with any global variables.

-- Josh

Reply via email to