title: How to disable element in jQuery autocomplete list
body: <p>Is it possible to disable a list element in an autocomplete, so it is not chooseable (and greyed out)?</p>
  
  <p>I have this code, taken from the jQuery UI example page:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;input id="tags" /&gt;
  </code></pre>
  
  <p>jQuery:</p>
  
  <pre><code>$(function() {
    var availableTags = [
      "ActionScript",
      "AppleScript",
      "Asp",
      "BASIC",
      "C",
      "C++",
      "Clojure",
      "COBOL",
      "ColdFusion",
      "Erlang",
      "Fortran",
      "Groovy",
      "Haskell",
      "Java",
      "JavaScript",
      "Lisp",
      "Perl",
      "PHP",
      "Python",
      "Ruby",
      "Scala",
      "Scheme"
    ];
    $( "#tags" ).autocomplete({
      source: availableTags
    });
  });
  </code></pre>
  
  <p>As an example - is it possible to disable the last element if there are more than 3 items in the list?</p>
  
  <p>In my real code, I have an AJAX request but I do not want to show more than 20 results in the autocomplete box, so if there are more than this, it should show something like "please narrow down your search" and disable the last element, so it is not chooseable (but only the last element should be disabled).</p>
  
  <p>The above code is here with a Fiddle demo, <a href="http://jsfiddle.net/m6zvf/" rel="noreferrer">http://jsfiddle.net/m6zvf/</a></p>