I believe you mean `$(this).attr('method')`; as the form does not have an attribute `post`