Jquery UI autocomplete header

Posted by Kanaka on Stack Overflow See other posts from Stack Overflow or by Kanaka
Published on 2013-10-25T15:52:39Z Indexed on 2013/10/25 15:53 UTC
Read the original article Hit count: 172

Filed under:
|
|

I have a jQuery UI autocomplete (with custom styling) where I added an header.

You can see it at work here:

http://jsfiddle.net/fbonomi/wJWGV/

the header is added like this:

function cComboboxOpen( event) 
{
    var s='.... header .....';
    $("ul.ui-autocomplete[style*='block']").prepend(s); 
}

it works, and it keeps the column-like form I need (the real data will also be in columns)

BUT, I would like to have the header NOT scrolling away when you have a long, scrollable list (e.g if you type "a" in the list)

I have seen another very similar question here: jQuery UI Autocomplete with fixed header But it hasn't been answered, and in its current form it does not work properly (the header is "fixed" even when one scrolls the page, for example)

How can I avoid the header to scroll away?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui