Alert firing every time - jQuery autocomplete
<p>In below jQuery the alert 'fire' is displayed every time a user types into the text box but is should just fire when the user types a letter that matches with 'test'. How can below code be updated so that the alert just fires when a match is made instead of firing everytime as the user types ?</p>

Select a project (type "j" for a start):

<pre><code>$(function() {

    $( "#project" ).autocomplete({
        minLength: 0,
 source: "/getfile?param=testerurl",
        focus: function( event, ui ) {
            $( "#project" ).val( ui.item.label );
            return false;
        },
    })
    .data( "autocomplete" )._renderItem = function( ul, item ) {
        alert('fire');
    };
</code></pre>

<p>});</p>

<p>Here is the json returned by </p>

<blockquote>
  <p>/getfile?param=testerurl</p>
</blockquote>

<pre><code>[{ "value": "test","label": "Sizzle JS","desc": "a pure-JavaScript CSS selector engine","icon": "sizzlejs_32x32.png"}]
</code></pre>
