如何使用slideToggle展开后滚动到某个元素?
scrollTo 没有滚动到超出页面底部的 div...有什么建议吗? (jQuery 1.3,滚动至 1.42)
function toggleCollapsible(ownerDiv) {
ownerDiv.next(".Collapsible").slideToggle("fast",
$.scrollTo(ownerDiv, "slow"));
}
scrollTo is not scrolling to a div that expands past the bottom of the page... any suggestions? (jQuery 1.3, scrollTo 1.42)
function toggleCollapsible(ownerDiv) {
ownerDiv.next(".Collapsible").slideToggle("fast",
$.scrollTo(ownerDiv, "slow"));
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试了您的代码并且它有效,但您忘记指定
$.scrollTo
应该位于匿名函数内(在slideToggle
完成切换后回调),它甚至滚动到页面底部下方。Tried your code and it works, but you forgot to specify, that
$.scrollTo
should be inside an anonymous function (callback afterslideToggle
finishes toggling) and it even scrolled to under bottom of page..