SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jun 2012
    Location
    Stockholm
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    horizontal scrolling

    I want a smooth horizontal scrolling to go to the top of a page when clicking on links. It links a few rows down in an iPhone, so I would need a code that makes you end up on top.
    It links to the right place in an iPhone but the address bar put in the way

    This only happens after the page has fully loaded, and then links it with no smooth scrolling, then directly to a place without smooth scrolling.

    I have tried this in my javascript:
    Code:
    window.scrollTo(0,0);

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,598
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    Do you mean vertical scrolling (that is, up and down)?

    Are you able to post a link?

  3. #3
    SitePoint Member
    Join Date
    Jun 2012
    Location
    Stockholm
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It looks something like this: http://gravitysign.com/fancyscroll/horizontal#/, but my site is about 3000px wide and 2000px high per section, which you scroll between (whole site about 12000px wide).
    I have changed the javascript so that the page works without smooth scrolling before the page has finished loading and in that case you do not end up at the top of the page (section) in the iPhone.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •