JSFiddle - React, Tailwind, and code Playground
HTML
<div><div is="div1">Is there a way to execute a function (ie Add Class, Remove Class...) only during the time of Scrolling a Specific div.
For example
If i'm having a div with a height of 1000px and overflow: auto properties. I like to add a class on the time of scrolling only. If the user stops scrolling inside a div that class has to be removed.Is there a way to execute a function (ie Add Class, Remove Class...) only during the time of Scrolling a Specific div.
Is there a way to execute a function (ie Add Class, Remove Class...) only during the time of Scrolling a Specific div.
For example
If i'm having a div with a height of 1000px and overflow: auto properties. I like to add a class on the time of scrolling only. If the user stops scrolling inside a div that class has to be removed.Is there a way to execute a function (ie Add Class, Remove Class...) only during the time of Scrolling a Specific div.
For example
If i'm having a div with a height of 1000px and overflow: auto properties. I like to add a class on the time of scrolling only. If the user stops scrolling inside a div that class has to be removed.Is there a way to execute a function (ie Add Class, Remove Class...) only during the time of Scrolling a Specific div.
For example
If i'm having a div with a height of 1000px and overflow: auto properties. I like to add a class on the time of scrolling only. If the user stops scrolling inside a div that class has to be removed.
For example
If i'm having a div with a height of 1000px and overflow: auto properties. I like to add a class on the time of scrolling only. If the user stops scrolling inside a div that class has to be removed.Is there a way to execute a function (ie Add Class, Remove Class...) only during the time of Scrolling a Specific div.
For example
f i'm having a div with a height of 1000px and overflow: auto properties. I like to add a class on the time of scrolling only. If the user stops scrolling inside a div that class has to be...
CSS
#div1
{
width:50px;
}
JavaScript
window.onscroll = function () {
alert('sdfsdfsd')
}