Jump to content

starwag

Members
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About starwag

  • Rank
    Newbie
  1. starwag

    Pause ScrollTo / scrollbar effect

    Sorry, I wasn't clear. I'll edit the original question. I really appreciate your quick response, though. What I was wanting was to pause the ScrollTo animation onmouseup. Example: when the button is onmousedown start animation towards the anchor at bottom of the div, and onmouseup pause the animation. Basically, I am trying to make a button to replace a scrollbar, so I'm trying to achieve the same behavior, where holding down on the button begins a smooth scroll that pauses when the button is released. The onmouseup should leave the div at the y location it was before it stopped, and the user should be able to start from this position to go the other y direction, if they so choose. I don't think setTimeout/setInterval would help for this, but maybe I'm wrong. I've tried to override the bottom anchor with current y-position coordinates, using Yoffset, but that did not work out so well, which is why I'm wondering if ScrollTo animation can be paused without setting a timer. Like I said, I'm assuming I can't, but I am still learning.
  2. I've been trying to create a two button system to allow viewers to scroll up and down through a list, much like they would be able to with a scrollbar. Onmousedown should implement a scrolling animation using the list's content. I was intending to use JavaScript ScrollTo, with anchors at the top and bottoms of the div, but wondered if there is any way to make this pause onmouseup before it reaches its anchor, and then reverse from its current position, so that I could accomplish this scrollbar effect. Basically, it should act just like a scrollbar, where releasing the down button will stop the animation at its current y-position and allow the user to redirect their scroll if they choose. I suspect this is not possible with ScrollTo, but does anyone know?
×