$('form').each(function(){
var form = this;
$('a', this).click(function(){ form.submit(); });
});
Is there any way I can get the parent (this) element inside of that click function, without using a intermediate variable? I was thinking that maybe there’s a keyword I’m not aware of that lets you do it.
In the $.ajax function there’s a context paramters which allows you to do something like this.
No, you have done it the best way. Convention suggests using that: