title: jQuery validate two submit buttons
body: <p>I am trying to get two separate functions to fire depending on which submit button is pressed. When I click 'submit1', 'openMailer_1' appears in the console log, but then when I click 'submit2' 'openMailer_1' appears again, not 'openMailer_2'. Any idea what I've done wrong here?</p>
  
  <pre><code>$('*[id^=submit]').live('click', function() {
  
    var id = $(this).attr('id').slice(-1);
    console.log(id);  
  
    $('#result_form').validate({
      invalidHandler: function(form) { 
      //
      },              
      submitHandler: function(form) {             
        openMailer['openMailer_' + id](); 
      }
    });
  });
  
  var openMailer = {
    openMailer_1: function() {
      console.log('openMailer_1');    
    },
  
    openMailer_2: function() {
      console.log('openMailer_2');
    }
  }
  
  
  &lt;form id="result_form" action="" method="post"&gt; 
    &lt;input type="submit" name="btn_send" id="submit1" value="submit1" /&gt;
    &lt;input type="submit" name="btn_send" id="submit2" value="submit2" /&gt;
  &lt;/form&gt;
  </code></pre>