Questions tagged [onscroll]

The onscroll is HTML DOM event occurs when an element's scrollbar is being scrolled.

The onscroll is HTML DOM event occurs when an element's scrollbar is being scrolled.

Useful links

334 questions
-1
votes
1 answer

Making image fade from opacity:0 to opacity:1 when its position is reached

I've searched hours for code that will create a fade-in effect on an image when a user reaches its position, but my code continues to either work partially or not work at all. I'm thinking it could be my css positioning that is throwing it off but I…
Trent
  • 3
  • 1
  • 6
-1
votes
1 answer

how to add a counter updating when you scroll down a page

How can I add a counter updating when you scroll down a page? I like the effect that chartbeat has. What jQuery should I use to be able to achieve that?
mikker
  • 5
  • 4
-3
votes
1 answer

Why does onscroll work without parenthesis in this function?

I have made 3 functions on calling the windowScroll function. Why does it not work with the extra parenthesis, but works when inside its own function or without parenthesis? var windowScroll = function() { var doesNotRun = function() { …
Marco Angelo
  • 79
  • 1
  • 8
-4
votes
1 answer

How to solve the error " Can not read property 'top' of null "?

I am trying to make a function for scrolling event in HubSpot CMS, but getting the error for onScroll event.The script is as below: Error I am getting on line: if (refElement.position().top <= scrollPos && refElement.position().top +…
1 2 3
22
23