jQuery UI AutoComplete - 如何实现进度指示器?
如果问题标题不够清楚:
我正在使用 jQuery AutoComplete 插件(jQuery UI 1.8.5 的一部分)
我本以为提供的 CSS/图像会包含类似 ajax 的进度图像?
如果没有,创建一个最简单的方法是什么?
这是我的自动完成代码:
$('#query').autocomplete({
source: function (request, response) {
$.ajax({
url: "/Search/FindLocations",
type: "POST",
dataType: "json",
data:
{
searchText: request.term
},
success: function (data) {
response($.map(data, function (item) {
return { name: item.name, value: item.name }
}))
}),
select: function (event, ui) {
// snip... (this is where i display stuff about what they clicked).
}});
在上面的代码中我应该在哪里隐藏/显示图像?
显然,在“选择”中的代码之后,我可以隐藏图像,但是我可以在哪里“显示”图像?
If the question title wasn't clear enough:
I am using the jQuery AutoComplete plugin (part of jQuery UI 1.8.5)
I would have thought the supplied CSS/images would include an ajax-like progress image?
If not, what's the easiest way to create one?
This is my autocomplete code:
$('#query').autocomplete({
source: function (request, response) {
$.ajax({
url: "/Search/FindLocations",
type: "POST",
dataType: "json",
data:
{
searchText: request.term
},
success: function (data) {
response($.map(data, function (item) {
return { name: item.name, value: item.name }
}))
}),
select: function (event, ui) {
// snip... (this is where i display stuff about what they clicked).
}});
Where should i hide/show an image in the above code?
Obviously after the code in "select", i could hide an image, but where can i "show" the image?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)