tags:

views:

110

answers:

1

Hi,

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

+2  A: 

you can check elem.clientHeight < elem.scrollHeight value but it also depends of css properties