title: About Jquery Name,Submit and attribute
body: <p>My J query code looks like this </p>
  
  <pre><code>jQuery(document).ready(function($) {
  $(".respond").submit(function(event){
      var $form = $(this);
  </code></pre>
  
  <p>.....</p>
  
  <p>I want to grab the name of the submit button that was clicked...</p>
  
  <p>I tried couple of things like this but it didn't worked...</p>
  
  <pre><code>console.log($("$form input:submit").attr("name"));
  
  .... 
  
  console.log($form+$("input:submit").attr("name"));
  
  .....
  </code></pre>
  
  <p>But this works.</p>
  
  <pre><code>console.log(".respond input:submit").attr("name"));
  </code></pre>
  
  <p>i don't know why it didn't works when i use $form.</p>
  
  <p>Can someone tell me how do i find the input of that .respond using $form(or $this) .</p>
  
  <p>Thanks</p>