I think this should be simple. Say I\'ve got the following jQuery:
$someForm.live(\'submit\', function(event) {
// do something
});
If there
Normally you can use event.target for the element itself...and in this case, since it's a native DOM property, just use .name as well:
$someForm.live('submit', function(event) {
var name = event.target.name;
});
However, since submit doesn't originate from the button, only a click does, you want something more like this:
$("form :submit").live('click', function(event) {
var name = this.name;
});
Use this here, because as @patrick points out, a can have children as well, and the target may be a child in those cases.