Auto_completer how to make a summary line not selectable

i’m making an autocomplete field, where the autocompleter selects from
roughly 10,000 items in a table. Of course i use LIMIT to limit the
resultset to about 7 items.

In the bottom of the autocomplete div, I want to add a total count
line. The problem is that if I add it to the UL, the li with the total
sum is selectable… not good.

I tried to add

  • Total found: 52
  • But that li is still selectable.

    Is there a way of adding this information or is there some syntactic
    sugar I can make use of already?

    THanks for your replies :slight_smile:

    /Jesper Rønn-Jensen
    Blog: www.justaddwater.dk

    you could make it a ul group header.

    On Apr 29, 2008, at 16:32 , Jesper Rønn-Jensen wrote:

    But that li is still selectable.

    Is there a way of adding this information or is there some syntactic
    sugar I can make use of already?

    Hi Jesper, doing some dirty trials looks like you can put stuff
    after the list like this:

     <ul>
     <li>Foo</li>
     <li>Bar</li>
     </ul>
     <div style="width: 100%;">Total: 2</div>
    

    The content of that extra DIV is not selectable, with the help of some
    good CSS it may look nice.

    – fxn

    This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

    | Privacy Policy | Terms of Service | Remote Ruby Jobs