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
4
votes
3 answers

How to detect if browser supports js onscroll.. immediately

I want to detect if a browser supports onscroll immediately?.. The problem is that older IOS versions of IOS support onscroll, but it gets triggered at the end of the scrolling. However I can't think of a way to detect this?
jon
  • 1,429
  • 1
  • 23
  • 40
4
votes
1 answer

Why is an interval function executed before an event callback?

I realized something odd about the javascript on scroll event. Until now I was always convinced that it would be fired directly, whenever the scroll position changes. And because javascript is blocking, a callback would always be the first thing to…
Jan Paepke
  • 1,997
  • 15
  • 25
4
votes
1 answer

How to trigger event after i scroll a page certain amount in pixels from the top? Javascript or Jquery

I am trying to trigger a video when I scroll a page 300px from the top. This works if I scroll window.onscroll = function(event) { myvideo.play(); } but I would like it to play once I scroll 300px
Zinox
  • 519
  • 9
  • 24
4
votes
2 answers

Android - ListView duplicate events

In my app I have a ListView backed by ArrayAdapter. In it I'm detecting events in OnScrollListener#onScroll method to find end of the list. I noticed that on the phone (MyTouch) both track-ball and gesture/touch scrolling will trigger the event…
Bostone
  • 36,858
  • 39
  • 167
  • 227
3
votes
1 answer

Material-UI & React: Using the Fade component onScroll

I'm new to using Material-UI. I want to use it's Fade component to fade in an element. I'm able to do that like this: About Me The Fade…
Nick Kinlen
  • 1,356
  • 4
  • 30
  • 58
3
votes
3 answers

How to get exact scroll position when animating elements onScroll

I am trying to animate elements while scrolling based on the elements progress through the scene. I am running into the issue of the browser returning intermittent scroll positions making it difficult to be exact when starting and stopping element…
Steve K
  • 8,505
  • 2
  • 20
  • 35
3
votes
1 answer

Faster scrolling without onScroll?

I was getting really excited after reading this article about faster scroll effects. I went implementing Warry's method to see if I could spot any difference in performance - compared to using the scroll event…
JasonK
  • 5,214
  • 9
  • 33
  • 61
3
votes
2 answers

Recyclerview fast scroll items disappear

I am using GridLayoutManager with recyclerview, when i fast scroll down one item out of four visible grid items (bottom right ) is moved further down, I am using this tutorial to implement fast scroll and fast scroll indicator here
Mohammad Khan
  • 571
  • 5
  • 13
3
votes
1 answer

ListView OnScrollListener doesn't get called inside a ViewPager

I have a FragmentPagerAdapter which creates it's child pages (which are ListFragments) as follows: @Override public Fragment getItem(int position) { return FragmentChildPage.newInstance(); } I give the ViewPager an OffscreenPageLimit of 1. The…
Milo
  • 1,017
  • 3
  • 16
  • 22
3
votes
0 answers

Improving jQuery On-Scroll Parallax Performance

This question is all about improving the performance of an on-scroll parallax background effect, which currently behaves erratically. I am experiencing a lot of jerkiness across all browsers, especially at a quick scroll rate. I have an absolutely…
Will Viles
  • 281
  • 2
  • 11
3
votes
2 answers

Android List OnScrollListener how to detect everytime a new List item is visible in either direction

Learning how to use the OnScrollListener and I want to make a way I can detect everytime a new List item is visible when a user scrolls up or down in a listview, if the user scrolls down I want to make a counter increment by 1 for each new cell…
Edmund Rojas
  • 6,376
  • 16
  • 61
  • 92
3
votes
0 answers

ScrollView stops updating Items when reaching its bounds

So the problem I am facing right now is the following, I want to create a fisheye view (so a view which contains items while the item in the middle is bigger then the other ones like you will see in the MAC OS itembar or somewhere else). So far I…
DokutoMekki
  • 491
  • 4
  • 17
3
votes
1 answer

"scrollHeight" not updated in "onscroll" event handler when using HtmlCtrl in an application but works correctly in IE9

When sample below code loads in IE9, it works correctly, but when loads in an html control in an application, scrollHeight not updated in onscroll event handler when I change the innerHTML content in the handler, and therefore the alert not to be…
2
votes
1 answer

How can I determine motion direction in an Android Gallery?

I have been creating a Gallery derivative that uses a limited number of Views and, as such, the Adapter needs to be able to populate these Views ahead of time during a scroll or a fling. To do this, I need to get the direction of motion from the…
Andrew Wyld
  • 7,133
  • 7
  • 54
  • 96
2
votes
0 answers

why does this on scroll code work in the Browser and not on Mobile?

I have the following code snippet: