I have a template page where I placed a "go to top" link on the bottom of the page. On pages that have long contents, this works great. However, on short pages, the go-to-top link is useless since users don't have to scroll up. Is there an umbraco library to get page height, maybe I can combine this with xslt so it only shows the go to top link on the bottom of long pages instead of short ones?
Get page height
I have a template page where I placed a "go to top" link on the bottom of the page. On pages that have long contents, this works great. However, on short pages, the go-to-top link is useless since users don't have to scroll up. Is there an umbraco library to get page height, maybe I can combine this with xslt so it only shows the go to top link on the bottom of long pages instead of short ones?
Hi Chris
I think the way around this is to use jquery's height() function, which you can read more about here: http://api.jquery.com/height/
I would get the height of the primary content container and if it's less than your defined height you can hide the "go to top" link.
Hope these pointers makes sense.
/Jan
I was able to get it to work with jquery instead, thanks Jan.
is working on a reply...