You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

constant scrolling speed Created Sep 21, 2009

This thread is solved

Views: 2664     Replies: 2     Last reply Oct 8, 2009  
You must login first before you can use this feature

blacktrash
underdogma: free videos at http://www.blacktrash.org/

Posts: 1185

Registered:
May 27, 2008

constant scrolling speed

Posted: Sep 21, 2009

I have a scrollable of size: 1 and try to scroll at the same speed regardless of how many pages are traversed to get to the seek target (more like what I understand by speed: distance / time).


$("#sc").scrollable({
  size: 1,
  onBeforeSeek: function (e, i) {
    var c = this.getIndex(); // also tried this.getPageIndex();
    this.getConf().speed = (Math.max(c, i) - Math.min(c, i)) * 200;
    // console.log(this.getConf().speed);
  }
});

Even though the desired dynamic speed is logged onBeforeSeek, it only applies for the next seek which sort of defeats the whole purpose ;-(

Any ideas what as to what I am missing? I also tried this.reload(), but it didn't have any effect (and is perhaps useless inside a configured event).

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1838

Registered:
Nov 16, 2007

» constant scrolling speed

Posted: Sep 22, 2009

Reply to: constant scrolling speed, from blacktrash
if you look at the scrollable source code you can see that the scrolling time is determined before the onBeforeSeek event making it impossible to change it.

I need to change the behaviour for the next release since you have a very good idea here. Thank you for the suggestion!

blacktrash
underdogma: free videos at http://www.blacktrash.org/

Posts: 1185

Registered:
May 27, 2008

» » constant scrolling speed

Posted: Oct 8, 2009

Reply to: » constant scrolling speed, from tipiirai
Thanks for implementing this in the new release! Surprise, surprise: it works ;-)