I want to display a "Go to top"-Link on my website. This link should only be visible, if the vertical scrollbar is visible.
How can I do this using JavaScript?
Thanks
you can check elem.clientHeight < elem.scrollHeight
value but it also depends of css properties
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With