Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • chris 69 posts 92 karma points
    Nov 12, 2010 @ 19:35
    chris
    0

    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?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 12, 2010 @ 19:42
    Jan Skovgaard
    0

    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

  • chris 69 posts 92 karma points
    Nov 13, 2010 @ 16:59
    chris
    0

    I was able to get it to work with jquery instead, thanks Jan.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies