jQuery 工具可滚动,动态改变高度
我的页面中有一个可滚动的 div。容器 div 将其最小高度设置为某个值。我希望可滚动的项目可以显示/隐藏。这意味着可滚动的高度不固定。当显示该项目时,可滚动的高度也应该变为更长。但这是行不通的。当显示项目时,可滚动条不会变长,这使得显示的项目不完全显示。
我认为这与可滚动插件有关。但我不明白为什么。有人帮忙吗?
I have a scrollable div in my page. The container div has its min-height set to some value. And I want the item in the scrollable can be shown/hidden. It means that the height of the scrollable is not fixed. When the item is shown, the height of the scrollable should also change to longer. But this is not working. When the item is shown, the scrollable does not become longer which makes the shown item not completely shown.
I think it has something to do with the scrollable plugin. But I cannot figure out why. Anyone help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用可滚动事件
示例
您需要向索引添加 1,因为可滚动会克隆第一个和最后一个项目。
Use scrollable Events
Example
You need to add 1 to index because Scrollable clones the fist and last item.