title: Jquery comparing to 2 different AJAX Calls - wanted to understand if there are any benifits of either
body: <p>I have 2 AJAX calls that achieve the same result but they are written differently. I just wanted to ask if there is any real benifit it either one or if basically they are the same:</p>
  
  <pre><code>$('#joinCaptchaTextBox').keyup(function() {
      $.get('scripts/ajax/script.php', {
          'join_captcha': '1',
          'captcha': $('#joinCaptchaTextBox').val()},         
          function(data) {
              var obj = JSON.parse(data);
              if(obj.ajaxResponse.status) {
                  $('#joinCaptchaNotAcceptable').hide();
                  $('#joinCaptchaAcceptable').show();
              }else{
                  $('#joinCaptchaAcceptable').hide();
                  $('#joinCaptchaNotAcceptable').show();
              }
      });
  });
  </code></pre>
  
  <p>And</p>
  
  <pre><code>$('#joinCaptchaTextBox').on('keyup', function() {
              var data = {
                      join_captcha: '1',
                      captcha : $('#joinCaptchaTextBox').val()
              };
  
              $.ajax({
                  url : 'scripts/ajax/script.php',
                  data: data,
                  dataType: 'json'
              }).done(function(result) {
                  $('#joinCaptchaNotAcceptable').toggle(!result.ajaxResponse.status);
                  $('#joinCaptchaAcceptable').toggle(result.ajaxResponse.status);
              });
  });
  </code></pre>
  
  <p>I can see the second one is a little more efficent with the toggle but outside of this is either one specifically better? Just trying to understand which type to use. Note: a GET HTTP request is required.</p>
  
  <p>thankyou</p>