jQuery的,自动完成滚动发行 [英] jQuery-autocomplete scroll issue

查看:107
本文介绍了jQuery的,自动完成滚动发行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用我的应用程序 Rails3中,jquery的,自动完成。我遇到了以下问题:
如果你让自动完成数据的获取显示,之后滚动页面输入的输入域的东西,用自动完成数据盒未与页面滚动。它停留在同一位置。

I'm using rails3-jquery-autocomplete in my application. I've faced the following issue: if you enter something in the input field so that autocomplete data gets displayed and scroll the page after that, the box with the autocomplete data isn't scrolled with the page. It stays at the same position.

您可以看一下我面临这里。注意这个例子不是由我创建的,所以我不知道同样的jQuery插件用在这里。尽管如此,问题是pretty一样的。

You can look at what i'm facing here. Note that this example isn't created by me, so i'm not sure the same jquery plugin is used here. Nevertheless the issue is pretty the same.

推荐答案

从选项自动填充也许你缺少appendTo属性。它默认的体内的,但你可能想拥有它你的容器的 DIV 的(很难说完全没有看到你的code)。

Probably you are missing appendTo-attribute from options to Autocomplete. It defaults to body, but you probably want to have it your container div (hard to say exactly without seeing your code).

请参阅文件的。

这篇关于jQuery的,自动完成滚动发行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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