title: Jquery autocomplete variable not working
body: <p>Is there any reason why the following might not pass the "checkit" variable onto the countryselect.php page?</p>
  
  <pre><code>$(function () {
      $('#abbrev').val("");
      $('#country').on('change', function () {
          alert($("#country").val());
      });
      $("#state").autocomplete({
          source: "/countrycomplete.php?checkit=" + $("#country").val(),
          minLength: 2,
          select: function (event, ui) {
              $('#state_id').val(ui.item.id);
              $('#abbrev').val(ui.item.abbrev);
          }
      });
  });
  </code></pre>
  
  <p>The alert () is there just to see if the variable is there, and this produces the expected result. However, this line, - source: "/countrycomplete.php?checkit="+$( "#country").val(), - does not send the variable on to countrycomplete.php</p>
  
  <p>Any ideas?</p>
  
  <p>I have gone through a number of other posts here related to the same question, but none so far have presented a working solution....I bet there must be some really tiny mistake, but...so far I haven't been able to find it.</p>
  
  <p>EDITED VERSION:</p>
  
  <pre><code>$(function() {
      $('#abbrev').val("");
      $('#country').on('change', function(){
          $( "#state" ).autocomplete({
              "option", 
              "source", 
              "/countrycomplete.php?checkit="+$(this).val(),
              minLength: 2,
              select: function(event, ui) {
                  $('#state_id').val(ui.item.id);
                  $('#abbrev').val(ui.item.abbrev);
              }
          });
      });
  });
  </code></pre>
  
  <p>Thanks in advance!</p>