jQuery自动完成功能,将结果返回到单独的图层 [英] jquery autocomplete, return results to separate layer

查看:69
本文介绍了jQuery自动完成功能,将结果返回到单独的图层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用jquery UI 1.8的自动完成功能,是否有已知方法获取结果并将其返回到页面上的另一个div元素,或者自定义返回时的外观?我希望结果显示在一个基本上可以与之交互的列表中.

Using jquery UI 1.8's autocomplete, is there any known way to take the results and return them to a different div element on the page, or to customize how they look upon return? I want to have the results show up in a list that can be interacted with, essentially.

推荐答案

似乎没有一种将结果返回到页面上其他位置的内置方法.但是,自定义它们的外观非常简单,只需将CSS应用于小部件即可. 主题文档将解释所有详细信息.

There does not seem to be a built in way to return the results to another location on the page. However, customizing how they look is quite straightforward, that is just a matter of applying CSS to the widget. The Theming docs will explain all the detail.

我建议将事件处理程序附加到自动完成(可能是搜索)的事件之一上,并编写自己的自定义代码以捕获结果并将它们移至DOM中所需的位置.

I would suggest attaching an event handler to one of the events of the autocomplete (maybe search) and writing your own custom code to capture the results and move them to the the required place in the DOM.

这篇关于jQuery自动完成功能,将结果返回到单独的图层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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