Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2009
    Thanked 0 Times in 0 Posts

    problem with js scroll

    Hello people. I'm new around here.

    I've already tried the search, but i haven't been able to find anything related to what i need. If in fact, if there is a thread and i didn't find it, i apologize.

    First of all, I'm not a coder, developer or whatever it may be called, i'm a designer.. so i know very little code, enough to defend myself with css & html, but js is more difficult for me...

    I've managed to get a couple of functions running for the portfolio i'm trying to do for myself by checking with friends and google. They are in fact working, but i'm having another problem derived from what i'm doing.

    this is the test website i've done:

    if you check the source code, you will see two js functions.

    Now, if you click on the flash buttons and load the divs, you'll see there's an automatic scroll, and it works, but sometimes, mostly if you go on clicking and loading other divs, if then you try to go up again with a manual scroll, it'll get like stuck... going back and forth, up and down, till it gets unstuck and goes up definitely...

    i really don't know what's happening, but i assume it has to do with the 'scroller' function.

    can anyone help me with this??

    bythe way, i've tested it with FF and Safari on a Mac.


  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    London, UK
    Thanked 110 Times in 109 Posts
    I think it might be because you're using animate(), and you're trying to scroll both the html and body elements.

    There's a ScrollTo plugin for jQuery that's very useful. You should be able to do something like this:

    function scroller(parametro){
      $.scrollTo($('#'+parametro), 350);


    Posting Permissions

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