如何使匹配的文本加粗与jQuery用户界面自动完成? [英] How to make matched text bold with jquery ui autocomplete?

查看:158
本文介绍了如何使匹配的文本加粗与jQuery用户界面自动完成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何使用jQuery用户界面自动完成时做出的自动完成建议大胆匹配的部分?

I am wondering how to make the matched part of the autocomplete suggestions bold when using jquery ui autocomplete?

所以,举例来说,如果你输入JA和建议是JavaScript和Java(就像在jQuery UI的演示页的示例),那么我想请同时建议,JA大胆。

So for example if you type in "ja" and the suggestions are javascript and java (like in the example on the jquery ui demo page) then I would like to make "ja" bold in both suggestions.

任何人都知道该怎么做?

Anyone knows how to do that?

非常感谢您的帮助...

Thanks a lot for the help...

推荐答案

我不知道为什么自动完成如此裸骨相比,它包含的其他功能(如投掷的,可排序,可拖动等)。

I'm not sure why the autocomplete is so bare-bone compared to the other functionalities it contains (e.g. droppable, sortable, draggable etc.).

真的应该为你提供一个风格化的选项,例如用它包装<跨度类=UI的自动完成期限>术语LT; / SPAN方式> 或类似的东西。

It should really offer you with a stylable option, e.g. wrapping it with <span class="ui-autocomplete-term">term</span> or something similar.

您可以做到这一点像

这应该是pretty不言自明的;如果没有,给我留言。

It should be pretty self-explanatory; if not, gimme a shout.

这篇关于如何使匹配的文本加粗与jQuery用户界面自动完成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆