Show on scroll & hide on hold

Hello everyone!

I have 5 separate div blocks that I only want to show on scroll but make them disappear as soon as it stops scrolling. I’ve been trying different ways but none is working as intended.

Any help? Thanks a lot!

1 Like

:pray: anyone? Couldn’t find any solutions anywhere else

Apologies. By default it was written on my post and forgot to remove. I can’t share my clients work and tbh it won’t help.

It’s five small elements that should be only visible when scrolling and disappear when the user stops scrolling through the article. Elements should not be visible either when page loads.

After lots of failing attempts I solved it with this code:

$(window).scroll(function() {
$(‘element’).stop(true, true).show().fadeOut(1800);

1 Like