title: jQuery ajax sending multiple request on 1 click
body: <p>i don't know what happened to my code i am clicking on send button send email and its sending multiple duplicate emails.. Same jQuery and html code used in another page for delete files and working fine..
  is i am doing some thing? wrong ?
  <img src="https://i.stack.imgur.com/HduwF.png" alt="enter image description here"></p>
  
  <p><strong>jQuery:</strong></p>
  
  <pre><code>$(document).on('click','.sendwork',function(e){
      $('#spinner').show();
      var sendWork = $(this).data('id');
  
      var res         = sendWork.split("-");
      var comment_id  =  res[0];
      var status      =  res[1];
      var order_id    =  res[2];
      var td = $(this).closest("td").andSelf();
  
      $.ajax({
          type:'POST',
          url:'{!! URL::to('admin/sendwork/') !!}',
          cache: false,
          data:{
           '_token'   : '{{ csrf_token() }}',
           'comment_id':comment_id,
           'status':status,
           order_id:order_id,
          },
          success: function(data){
              $('#spinner').hide();
              if (data == 'true') {
                  // $('.email-resp').html('');
                  td.html('Email Sent');
              }
  
          },
          error:function(data){
              $('#spinner').hide();
              td.html('&lt;p style="color:red; font-weight:bold;"&gt;Fail&lt;/p&gt;');
          }
      });
  
   });
  </code></pre>
  
  <p><strong>html:</strong></p>
  
  <pre><code>&lt;table class="table table-compact table-bordered"&gt;
  
      &lt;tr&gt;
          &lt;th width="10"&gt;&lt;/th&gt;
          &lt;th width="30"&gt;Date&lt;/th&gt;
          &lt;th width="20"&gt;User&lt;/th&gt;
          &lt;th width="20"&gt;Status&lt;/th&gt;
          &lt;th width="450"&gt;Comment&lt;/th&gt;
          &lt;th width="100"&gt;Files&lt;/th&gt;
      &lt;th width="30"&gt;Action&lt;/th&gt;
      &lt;/tr&gt;
  
      &lt;tr&gt;
          &lt;td&gt;&lt;a class="del-comment" href="javascript:void(0)" data-token="XyjbZEsvbfTnurM0OnRP75k049Re0dPpLynRqUe6" id="217"&gt;&lt;span style="color:red;" class="glyphicon glyphicon-remove"&gt;&lt;/span&gt;&lt;/a&gt; &lt;/td&gt;
          &lt;td&gt;01-Apr-15&lt;/td&gt;
          &lt;td width="30"&gt;hy&lt;/td&gt;
          &lt;td&gt;Completed&lt;/td&gt;
          &lt;td width="42" align="left"&gt;&lt;p&gt;sdf&lt;/p&gt;&lt;/td&gt;
          &lt;td&gt;
              &lt;a href="/uploads/PE10_1427882386_0.png" target="_blank" alt="PE10_1427882386_0.png" title="PE10_1427882386_0.png"&gt;&lt;i class="fa fa-picture-o"&gt;&lt;/i&gt;&lt;/a&gt;                  &lt;/td&gt;
          &lt;td&gt;&lt;a href="javascript:void(0)" class="btn btn-small btn-success sendwork" data-id="217-Completed-LEH1000"&gt;Send&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
  
  &lt;/table&gt;
  </code></pre>