jquery scrollto(?) but smarter...

  • Started
  • Last post
  • 3 Responses
  • wwfc

    howdoo...

    can anyone help me out here - i am trying to get scrollto.js to do something that it doesn't seem to want to do... :-(

    i want to use scrollto.js to recognise certain points in a layout and respond to bith the point where it is and also what the user is clicking in the menu/nav... it would then see if there were any remaining distance left in the section to scroll and once that section had finished it would skip/jump to the selected section before autoscroll to the mid point of the selected section...

    section 'a' is 300px in depth/duration and starts at scroll point 150px and finishes at 450px so the link would initially go to 150px and autoscroll(??) down to 300px and stop there.

    and if another link is clicked section 'a' continues it's scroll through to 450px then skips to the scroll height of the section selected in the same manner as above.

    i've seen similar navigation methods but these scroll through all and any sections in between not just a straight move from one section to another section rergardless of scroll position.

    so it would be like
    link 1 - jumps to 150px postion and auto scrolls to 300px
    link 2 - jumps to 500px postion and auto scrolls to 650px
    link 3 - jumps to 700px postion and auto scrolls to 850px

    and all three links play the remaining 150px of current section/sequence before making the jump...

    hope that makes more sense - i've tried various things with scrollto.js but it either scrolls through everything in between the points or simply skips and stops dead at whatever point...

    i might be asking for the moon on a stick but as there are few 'heads' on here that know this stuff - thought it worth an ask...

    anything anyone can give me will be most welcome - tuts/source/jsfiddles/urls... anything!!!

    ***and apologies for the long winded post!!!***

  • rabbit0

    just press the button that says make this do that and then turn off the fucking computer and go gome

    • home go home! what are you!? too good for your home!?rabbit
    • lol! self employed has no home rabbit!!! (or gome come to mention it)
      wwfc
  • Weyland0
    • used that before weyland - thanks for the link though...
      ;-)
      wwfc
    • yeah I TLDRed ;)Weyland
  • fues0

    Have you tried Greensock's scrollto plugin?
    I think you can manipulate the tweening class as such.

    More info:
    http://www.greensock.com/get-sta…

    • aah! yes... will try this too... thanks fueswwfc