Using jQuery Templates with Autocomplete and NOT using ul/li

蓝咒 提交于 2020-01-06 07:59:26

问题


@swatkins gave a fantastic answer to his own question about using jQuery templates with jquery UI's autocomplete here: Is there a way to use jQuery templates (official plugin) with jQuery UI Autocomplete?

My question builds off of that.

Basically i am wondering how would one go about building an autocomplete, with jQuery templates, that does not use any sort of lists?

The reason i ask is i'd like to display a lot of information in a small space and styling it with lists does not seem to allow this... Also, i'm just really curious :)

Thank you!


回答1:


Use a list item, but nest the html to display inside of it. Then, you can style the list items to show in columns if you'd like.

Here's my updated fiddle:

http://jsfiddle.net/XXeDd/8/



来源:https://stackoverflow.com/questions/10966459/using-jquery-templates-with-autocomplete-and-not-using-ul-li

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!