Jquery Auto complete append link at the bottom

Posted by Ashwin Preetham Lobo on Stack Overflow See other posts from Stack Overflow or by Ashwin Preetham Lobo
Published on 2012-09-18T14:51:16Z Indexed on 2012/09/18 15:38 UTC
Read the original article Hit count: 273

Filed under:
|

I am using jQuery auto-complete plugin in my web project. I want to show 3 element and after that i want to append 'see all results' link to the bottom. Jquery Autocomplete

I tried with following code.

$( ".grid-search-box" ).autocomplete({
      minLength: 0,
      source: temp,
    focus: function( event, ui ) {
       $( ".grid-search-box" ).val( ui.item.value );
       return false;
     },
     select: function( event, ui ) {
        $( ".grid-search-box" ).val( ui.item.value );
          return false;
             }
    }).data( "autocomplete" )._renderItem = function( ul, item ) 
         {
        return $( "<li></li>" )
           .data( "item.autocomplete", item )
           .append( "<a><span class='" + item.status + "'></span>" + item.value + "</a>" )
        .appendTo( ul );
                        };

Can anybody suggest me, how to solve it.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui