在 jQuery UI 自动完成结果中显示图标
我正在使用 jQuery UI 自动完成插件(版本 1.8),并且我想自定义建议的显示方式。具体来说,我不仅想显示一些文本,还想显示一个图标。但是,当我发送 标签,它只是在结果列表中呈现为纯文本。
有什么方法可以改变这种行为吗?或者,您能否建议一种不同的方式,将图像包含在返回的结果中,并将它们显示在建议中?
I'm using the jQuery UI Autocomplete plugin (version 1.8), and I'd like to customize the way the suggestions show up. Specifically, I want to display not only some text, but an icon as well. However, when I send the <img> tag, it just gets rendered as plain text in the results list.
Is there some way to change this behavior? Alternatively, can you suggest a different way to include images in the returned results and have them show up in the suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
取自 此处
和 CSS:
Taken from here
And the CSS: