The JQuery UI Demo page for autocomplete (link) has a nice looking search box and drop down with nice colors and highlights and such. When I implement it for myself, I end up with a bulleted list. How do I get my drop down of suggestions to look like theirs?
A few notes/code fragments:
<asp:ScriptManager>
tag with <asp:ScriptReference>
s inside it to get the hosted jquery.min.js (1.4.2) and jquery-ui.min.js (1.8.1) files from Google.<div class='ui-widget'>
<label for="terms">Term: </label>
<input id="terms" class="ui-autocomplete-input">
</div>
$(""#terms"").autocomplete({source:""GetAttributesJSON.aspx"",minLength:2});
I get the correct data back, so that's not the issue. I just want fancy graphics. Any thoughts would be much appreciated.
As Karim79 and Zack has mentioned you need to style the list. You can create your own theme and download it. Further information can be found here. Optionally you can use one of the many pre-built themes and include it in your document instead. Just head to the Jquery Download Page and select the theme you want.
Then just include the .css file
<link type="text/css" href="http://yourwebsite.com/css/ui-lightness/jquery-ui-1.8.custom.css" rel="stylesheet" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With