jQuery Show/Hide Div when Section is in Viewport

耗尽温柔 提交于 2019-12-08 14:25:36

Hide the green arrows and then onscrolling, test to see if the timeline div position is greater than the window height plus scrolling offset. If greater then that means that the timeline div is in view and the arrows should be shown.

Here is a quick fiddle demonstrating the effect: http://jsfiddle.net/EADDt/

Move these arrows into #gwennan-header and remove the fixed css attribute and set the z-index. That way you won't need any Javascript at all.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!