title: Handling multiple forms with ajax
body: <p>I'm trying to handle multiple forms with ajax.  Suppose I have #formA, and #formB.  And in the submitForm() function, I have the following:</p>
  
  <pre><code>function submitForm() {
    var currentForm = $(this);
    if (currentForm == "#formA") {
     //do this
    }
    else if (currentForm == "#formB"){
     //do that
    } 
  }
  </code></pre>
  
  <p>However this approach is not working. What is the best way to deal with this?
  Thanks in advance.</p>