Javascript点击后隐藏滚动并到达页面顶部
我在我的网站中使用这个: http://www.dynamicdrive.com/dynamicindex3/scrolltop.htm
效果很好为我。但我面临的唯一问题是,当我点击图片时,它的不透明度变成0,但图片的同一位置仍然有一个链接。我也想隐藏链接! 我尝试过在js文件中不显示css,但一无所获!
I'm using this in my website:
http://www.dynamicdrive.com/dynamicindex3/scrolltop.htm
and it works great for me. But the only thing that I face is that when I click on the picture, it's opacity become 0 but there is still a link in the same place of the picture. I want to hide the link as well!
I have tried display none for the css in the js file but reached nothing!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查这个http://jsfiddle.net/EJjvt/1/
Check this http://jsfiddle.net/EJjvt/1/
查找并替换上面的行,并查找其他 animate({opacity}) 函数并根据常识使用它们:)
当其不透明度:0时使用fadeOut
否则保留所有内容
并使用此功能
,上面将经常检查该事物是否可见,然后正确隐藏内容:)
find and replace the lines above, and also look for other animate({opacity}) functions and use them using common sense :)
when its opacity:0 use fadeOut
Other wise leave everything as it is
and use this
the above will check every so often if the thing is visible or not and then hide the contents properly :)