简体   繁体   English

滚动条到达容器底部时进行动画处理

[英]animate when scroll bar reaches bottom of container

I've got two nested text boxes side-by-side with both overflow properties set to scroll (in Edge Animate). 我有两个并排的嵌套文本框,两个溢出属性都设置为滚动(在Edge Animate中)。 I'm trying to make it so that when the first text box's scroll bar reaches the bottom the second text box fades in. 我正在尝试使第一个文本框的滚动条到达底部时,第二个文本框淡入。

I'm using the scrollTop() function with no success, ie 我正在使用scrollTop()函数没有成功,即

if (sym.$('My_div').scrollTop() == 100)
{
  sym.$('My_div2').show();
}

Any suggestions? 有什么建议么?

Maybe like this: 可能是这样的:

if (sym.$('My_div').scrollTop() == 100){
  sym.$('My_div2').show().fadeOut("slow");
}

Just added fadeOut or fadeIn and the set that to slow. 刚刚添加了fadeOut或fadeIn,并将其设置为慢速。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 滚动页面时滚动主容器。 当滚动到达容器底部时,滚动页面的其余部分(显示页脚等) - Scroll main container when page is scrolled. And when scroll reaches bottom of container, scroll the rest of the page(show footer etc.) 滚动到达页面底部时如何隐藏元素? - how to hide element when scroll reaches the bottom of the page? 当 div 到达 window 的底部时,粘贴并滚动到下一个 div - When div reaches bottom of window, stick and scroll over next div 当用户到达底部时,Javascript滚动将动态内容加载到页面中 - Javascript Scroll Load Dynamic Content Into Page When User Reaches Bottom 当滚动位置到达底部时,如何在数组中推送项目? - How to push item in array when scroll position reaches to bottom? 当鼠标光标到达顶部或底部边缘时滚动div - Scroll a div when mouse cursor reaches top or bottom edge 检测 Scroll 何时到达页面底部 [没有 jQuery ] - Detect when Scroll reaches the BOTTOM of the page [ without jQuery ] 在HTML到达底部之前滚动HTML页面 - Scroll HTML page before it 'reaches' the bottom 当内部元素滚动 position 到达顶部/底部时防止父元素滚动? - Prevent scrolling of parent element when inner element scroll position reaches top/bottom? 每次使用 js 滚动到达底部时,如何运行函数? - How do I run a function everytime when my scroll reaches bottom using js?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM