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

Shrink a fixed Div after user has scrolled 175px with animation

I have a div that is fixed at the top of the page, which holds the navigation to the website. It has a height of 175px. This DIV will remain on show as you scroll down the page. I would like this div to shrink to a height of 90px when the user has…
egr103
  • 3,858
  • 15
  • 68
  • 119
0
votes
2 answers

Javascript CSS when the user scrolls to an anchor

I have a website http://www.mitchellfinlay.co.uk/newlake/magazines.html It utilizes a curtain effect, each li element is revealed on scroll or automatically when links are clicked at the top... tempus...talkbusiness etc. What I would like to do is…
finlamit
  • 49
  • 4
0
votes
2 answers

Android disable onScroll() programmatically

How to disable onScroll() programmatically in Android? I have overriden method onScroll() in ListActivity. Now, I need to disable this method in certain part of my code. I need it for further logic.
Stas
  • 1,355
  • 6
  • 22
  • 40
0
votes
1 answer

IE6 onscroll glitch

I have a
with some content. I gave this div an id attribute, oDIV, and bound a function to the onscroll event via this small script: window.onload = { document.getElementById("oDiv").onscroll = function() { …
user17753
  • 3,083
  • 9
  • 35
  • 73
0
votes
2 answers

onItemClick of items in ListView after Scrolling throws NullPointerException

I have developed an activity that displays all the Contacts of Android phone and I am using a ListView to display the retrieved contacts. The problem is till the time I don't scroll my ListView, whenever I click on any list item - it is displaying…
0
votes
2 answers

JS Scroll Event - Windows Mobile IE

I am trying to detect a scroll event on Windows Mobile IE 6 However, Mobile IE 6 doesn't seem to support a scroll event of any type. Is there something I'm missing here? Here is some sample code: $(window).scroll(function(){ alert('test'); …
teynon
  • 7,540
  • 10
  • 63
  • 106
-1
votes
1 answer

How to add an event listener that sets state in the onScroll event of a React functional component?

I am having a difficult time trying to set state of a variable during the onScroll event of a custom React functional component. A minimal working CodeSandbox can be seen here: https://codesandbox.io/s/j8ml44 import React, { useEffect, useState,…
ss1319
  • 1
  • 1
-1
votes
1 answer

react native FlatList on scroll combined

I got a FlatList, this works ok...
manuelBetancurt
  • 15,428
  • 33
  • 118
  • 216
-1
votes
3 answers

How to add class on scroll ReactJS

Firstly i know theres many questions like this but i tried their answers too.... So lets get to the point: I want to add a class when i scroll in React... I tried to research some answers but none of them worked... this is my app.js: import React…
user13423237
-1
votes
1 answer

Why my website scroll seem laggy onscroll

I know there are quite a few posts on this topic, I have gone through quite a few of them. I've tried so many different optimizations people were suggesting. Nothing seems to be working. I did a Lighthouse performance check, and I did as many…
Hafiz Temuri
  • 3,882
  • 6
  • 41
  • 66
-1
votes
2 answers

Sticky Navigation on Scroll > add class for page-content

I'm using a script and would like to adjust it - but it does not work. So maybe someone can help me. Script: window.onscroll = function() {myFunction()}; var navigation = document.getElementById("navigation"); var sticky =…
Kish
  • 94
  • 1
  • 5
-1
votes
1 answer

how to toggle class by scrolling inside of and element in jQuery

I have and element classed .root-body it contain all page content and it scroll instead of . I want to toggle a class to my page .navigation when user scroll inside the .root-body HTML
-1
votes
2 answers

Can we use onScroll to do a Condition check

Functionality: User has to scroll and read through the TnC(Terms & Condition) Page before being allowed to click "Next" to proceed to the next page. Hence, if user does not read through the TnC and clicks "Next", a prompt will be displayed "Please…
Luke
  • 982
  • 1
  • 7
  • 27
-1
votes
1 answer

Android, Listview on Scroll Item position issue

I am facing a problem. I am working on QuickBlox Private chat. I want to show date and time with only last message of sent and get. I achieve that but issue is that when ever I scroll that message listview date and time change position and every…
user123456
  • 265
  • 2
  • 14
-1
votes
1 answer

Header changes on-scroll and sticks to the top

The header includes a simple large white title/logo, with a navigation right below it. Then upon scrolling past the navigation, the header changes to a pink, semi-transparent bar with the title/logo on the left and a navigation to the right. It…
Maira
  • 1
  • 1
1 2 3
22
23