Multiple forms all getting submitted

Multiple forms all getting submitted

Hi,

I have multiple forms on a page and want to connect to the submit event of each form, how ever when i click the submit button the submit is triggered for each form on the page instead of only for the form that the submi button was hit as i am intending.

Can someone explain this behaviour ? is submit a global event instead of against each form ?
Any suggestions on how to resolve this ? I have thought about using a click method on the submit button but realize i would be better of using .submit

I am aware of the form plugin (may have same issue) but would rather learn whats going on here and how to solve.
$(document).ready(function(){

$('form.ajax).submit(function(e){
e.preventDefault();
var ajaxForm=$(this);
$.ajax({
url:'/index.py',
type:'POST',
dataType:'html',
data:ajaxForm.serialize(),
success: function(data, status){










                  alert('success');
},
error: function(msg,txt){
alert('Err:' + msg.status + ' '+msg.statusText+' '+txt);
}
});




      return false;
      });
});