Show Scroll up button when user scrolls down from top of the page

Hi!  I have added "Scroll up" buttons within my app and they are working fine, but at the moment they are always visible at the bottom right corner, even if the user already is at the top of the page.   How can I display the button only when the user scrolls downs, say, at least 20px?   Elina
1 answers

Hi Elina,


I beleive this article might prove helpful, not sure if it's achievable with pure CSS ( Here you could set the scrollY check to be 20px. Just make sure to refer to the correct DOM element, as with most Mendix apps the window object is likely going to be fixed, and you need the layout element with vertical scroll. Here's a Stackoverflow solution with the same idea behind:


Hope this helps!

Best regards,