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

Your preferred username that is used when logging in.

Inconsistent scrolling intervals with scrollable Created Feb 3, 2009

This thread is solved

Views: 4214     Replies: 4     Last reply Feb 4, 2009  
You must login first before you can use this feature

biomark

Posts: 8

Registered:
Jan 27, 2009

Inconsistent scrolling intervals with scrollable

Posted: Feb 3, 2009

Hello,

I am having trouble debugging some weird interval timing issues using scrollable.

For some reason, when i call the api.prev() and api.next() functions it does not reset the scrolling interval.

Here is a testing page:

http://www.biossential.com/testing/natural-vitamin-supplements.htm

Right now my interval is set to 5000 (5 seconds). If you click the forward arrow twice, it will sit on the 3rd page for about 3 seconds instead of 5.

After that, the interval is completely unpredictable. Sometimes it will take 10 seconds, other times it will scroll after 1 second.

In IE7, it gets really crazy and scrolls after 1 second. FF3 waits about 3 seconds.

Does anyone know how i can fix this?

I have tried manually resetting the timer on each arrow click via a callback:


var api = $("div.scrollable").scrollable(); 
api.prev(function() { this.getConf().interval = 6000; });

but that doesn't seem to help.

Any ideas would be greatly appreciated!

Thanks,
Mark

Buzz
Author of 'Wordpress Flowplayer', jQuery.saiweb http://saiweb.co.uk Problems, requests? Please log a ticket at: http://trac.saiweb.co.uk

Posts: 271

Registered:
Dec 17, 2008

» Inconsistent scrolling intervals with scrollable

Posted: Feb 3, 2009

Reply to: Inconsistent scrolling intervals with scrollable, from biomark
Hi Biomark,

I am getting a consistent 5 second scroll time, check out this screencast showing this, from the point I refreshed your page, every 5 seconds the scroll occurred.

http://screencast.com/t/qSpMFPWdk

Now what you need to remember is that the interval is running in the background, so if it take you 2 seconds to manually scroll to an image, the next one will load in three seconds, as the timer is not reset when you navigate, at least this appears to be the case.

Now see the next screen cast where I really give it a hammering, clicking the next arrow a few hundred times, towards the end of the video once it has done processing the clicks you can see the timer return to the normal 5 seconds.

http://screencast.com/t/ogXkjAJd

biomark

Posts: 8

Registered:
Jan 27, 2009

» » Inconsistent scrolling intervals with scrollable

Posted: Feb 4, 2009

Reply to: » Inconsistent scrolling intervals with scrollable, from DBusby
thank you very much for the help, it is greatly appreciated.

Those videos tell all! Your right, it does not add the scrolling speed into the interval, though i think it should.

Coming back to it after a new day, i'm thinking for a better user experience, i should probably just disable the auto-scrolling if the user clicks the arrows or the navi buttons.

If the user wants to control the scrolling, then it would probably make sense to let him do so and not try to auto-scroll again after they click. If i clicked it and 3 seconds later it went away while i was in the middle of reading, i wouldn't be too happy.

Thanks again for the help....now if i could only solve this stupid navigator image bug in IE6 i posted here:http://flowplayer.org/forum/8/14246 ....heh

biomark

Posts: 8

Registered:
Jan 27, 2009

» Inconsistent scrolling intervals with scrollable

Posted: Feb 4, 2009

Reply to: Inconsistent scrolling intervals with scrollable, from biomark
arg...now i'm having another problem trying to disable the interval timer...when you click the arrows, i have this in my onClick function:

function slideBack() { 
var api = $("div.scrollable").scrollable(); 
api.prev(); 
api.getConf().interval = 0; 
return true;  
}

It works for moving the pages, i added the interval=0 line, and I figured that would stop the auto-scrolling. It does not, and even more strange, after setting the interval to 0 (by clicking on one of the arrow buttons), when you mouseover any of the navi buttons, the thing tweaks out and auto-scrolls with no pause, it acts as if it really has an interval of 0.

Documentation says setting this to 0 disables auto-scroll

You can check it out again here:

http://www.biossential.com/testing/natural-vitamin-supplements.htm

hmm any ideas? Thanks in advance.

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

Posts: 1867

Registered:
Nov 16, 2007

» » Inconsistent scrolling intervals with scrollable

Posted: Feb 4, 2009

Reply to: » Inconsistent scrolling intervals with scrollable, from biomark
I'm pretty certain that auto-scroll cannot be disabled at runtime at this release. I guess you have to make the auto-scroll feature yourself externally - look for the source code how to do that. It's not very hard. Just basic setInterval- stuff.