Multiple Image Fadeout on scroll

痞子三分冷 提交于 2019-12-02 08:14:38

But It seems that the fadeOuts queue

You can use .finish() to tell jquery to finish whatever is currently queued.

$("#active1").finish().fadeOut(2000);
$("#active2").finish().fadeIn(2000);
$("#active3").finish().fadeOut(2000);
$("#active4").finish().fadeOut(2000);
$("#active5").finish().fadeOut(2000);

this may not be what you want though and you may want .hide() for those that are not in the process.

You might be better adding a class and using css transitions.

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