jQuery的scrollTo插件问题。没有什么动静吗?
我在尝试让 div
在我正在构建的页面上滚动时遇到了真正的麻烦。
我基本上有一个 div
元素,其中有一个更宽的 div
,我想沿着它滚动以显示不同的区域,并因此更改内容。基本上是一个选项卡滑块,但略有不同。
我目前已将其设置为在悬停相关 div
时工作,事件触发但没有任何反应。请帮忙!
URL 为:http://ram.grtest.com/ 并单击“加入”。将鼠标悬停在其中的内容上,事件就会触发。不要点击“下一步 >” - 提交表格!
这是初始化(测试数据,稍后我会调整移动量)
$('#join-content').hover(function(){
$('#join-wrapper-scroll').scrollTo({axis: 'x',left:'+=100'}, 2000);
return false;
});
提前感谢!
I'm having real trouble trying to get a div
to scroll on a page I'm building.
I basically have a div
element, which has a much wider div
inside that I want to scroll along to show different areas, and as such change the content. Basically a tab slider but a little different.
I've set it up currently to work on hover of the div
in question, the event triggers but nothing happens. Please help!.
The URL is: http://ram.grtest.com/ and click 'Join'. Hover over the content in there and the event should trigger. Don't click 'Next >' - that submits a form!
Here's the initialisation (test data, i'll adjust the amount of movement later)
$('#join-content').hover(function(){
$('#join-wrapper-scroll').scrollTo({axis: 'x',left:'+=100'}, 2000);
return false;
});
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
#join-wrapper-scroll
在内容之前有一个内层吗?即你需要一个“内层”,否则插件将无法理解它正在滚动的内容。
Does
#join-wrapper-scroll
have an inside layer before the content? I.e.You need an "inner layer" or else the plugin won't understand what it's scrolling.
我想你想使用动画:
I think you want to use animate: