www.webdeveloper.com
Results 1 to 5 of 5

Thread: Help me remove ScrolltoTop on page refresh/load?

  1. #1
    Join Date
    Sep 2012
    Posts
    5

    Help me remove ScrolltoTop on page refresh/load?

    I am a javascript beginner, and I think I know what to look for when removing a ScrolltoTop function, but the search returns a large amount of instances within the script files, and I don't even know where to begin. So could somebody please help tell me how I can disable the page from scrolling to the top on a page load? What I'm editing by the way is a mobile layout for my SMF forum, and here are the three javascript files within the theme:

    http://www.immatureandpopular.com/Th...ts/compiled.js
    http://www.immatureandpopular.com/Th...ipts/jquery.js
    http://www.immatureandpopular.com/Th...uery.mobile.js

    Any help is greatly appreciated. Thank you.

  2. #2
    Join Date
    Mar 2009
    Posts
    452
    what is the problem you are actually facing ? and problem occurs on just mobile or desktop or both ?

  3. #3
    Join Date
    Sep 2012
    Posts
    5
    Quote Originally Posted by ZABI View Post
    what is the problem you are actually facing ? and problem occurs on just mobile or desktop or both ?
    Well, the theme is for my SMF forum. The problem only occurs in the mobile theme as the scroll code is included in the theme's scripts. And what happens is that whenever I scroll to the bottom of the page before the site loads, I am automatically taken back to the top once the site finishes loading. And this can become quite annoying. For example, if I click on a link that would take me to the latest reply on a thread, I am taken there, but as soon as the page finishes loading I'm taken to the top.

    Take a look for yourself, if you don't mind:
    http://www.immatureandpopular.com/index.php?theme=7

    Scroll to the bottom before the site finishes loading.

  4. #4
    Join Date
    Mar 2009
    Posts
    452
    HMmmmm, i had a quick look on your code, but did'nt find any statement causing the problem, try removing scripts one by one, maybe you find something

  5. #5
    Join Date
    Sep 2012
    Posts
    5
    There is over 50 instances of the scrolltotop function in one of the scripts. I don't know what I'm doing and I do not want to break anything. If anybody is willing to fix it for me, I'll give you full FTP access, and I am willing to pay. Thank you.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles