onscroll-effect
onscroll-effect copied to clipboard
Feature disable animation on certain devices
Animations might not be effective on certain devices. Usually on desktop they make sense where on mobile devices they might not allways be so useful. To adapt to this use case an other data attribute could be introduced. In the library AOS a disable
property is used for that case. Applied to this library a possible attribute could be data-scroll-disable="mobile"
. The value assigned to the attribute would indicate the biggest device type the animation is disabled for: Setting it to tablet
would disable it for mobiles and tablets. I found that AOS is using for this a Detector
class.