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

Your preferred username that is used when logging in.

Stop autoscroll Created Jun 25, 2010

This thread is solved

Views: 2745     Replies: 6     Last reply Sep 12, 2010  
You must login first before you can use this feature

snabbdesign

Posts: 6

Registered:
Jun 13, 2010

Stop autoscroll

Posted: Jun 25, 2010

Would you like to stop the autoscroll when:

* the mouse hovers the slideshow.
* any navigation button is pressed.

Here is an example of doing that:

http://www.qwer.se/jquerytools/scrolling2.html (feel free to copy anything accept the images)

<script type="text/javascript" src=http://www.qwer.se/jquerytools/jquery.tools.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#test').scrollable({circular:true}).autoscroll({interval:3000}).navigator();

var api_autoscroll = $('#test').data('scrollable');

$('.prev, .next, .navi').bind('click', function() {

api_autoscroll.stop();
});

centerNavi();
});

function centerNavi() {
var $nav = $('.navi'),
nav_width = $nav.width(),
stage_width = $('#test').width(),
nav_left = (stage_width/2) - (nav_width/2);

$nav.css('left',nav_left);
}
</script>

husk

Posts: 2

Registered:
Jun 26, 2010

» Stop autoscroll

Posted: Jun 26, 2010

Reply to: Stop autoscroll, from snabbdesign
i am solving the same issue ...
but i have one problem and your script also - if i hover the scrollable before it autoscrolls for the first time, it doesn't work. I mean the scrollable is autoscrolling even if the mouse is over it.

how to solve this problem, anyone?

seth.aldridge

Posts: 9

Registered:
Feb 18, 2010

» » Stop autoscroll

Posted: Jun 30, 2010

Reply to: » Stop autoscroll, from husk
Husk,

I've been looking into this and it seems this is an issue with how the auto scrolling function is built. It could be my tests, but it seems the api data isn't available until just before the auto scroll happens or as it happens.

That means if you click the navigation before the auto scroll event has occurred then the .stop() function doesn't have anything to stop.

Hopefully someone on the jQuery Tools team can weigh in.

Thanks,
Seth

sbefort

Posts: 4

Registered:
May 23, 2010

» » » Stop autoscroll

Posted: Jul 1, 2010

Reply to: » » Stop autoscroll, from seth.aldridge
This is a bigger problem than just hovering. Let's say you have an interval of 3000 set for the autoscroll. If you click on navigation tab #4 at a time of 2000, it will jump to #5 at 1000 milliseconds later.

FutureKode

Posts: 15

Registered:
Jan 20, 2010

» Stop autoscroll

Posted: Jul 23, 2010

Reply to: Stop autoscroll, from snabbdesign
.stop() is not working correctly for me either. Sometimes it will work and most of the time it won't.

Can someone please fix this issue.

Jeff_C

Posts: 5

Registered:
Aug 24, 2010

» Stop autoscroll

Posted: Sep 11, 2010

Reply to: Stop autoscroll, from snabbdesign
They fixed it. Yeay! :)

http://github.com/jquerytools/jquerytools/issues/issue/154

husk

Posts: 2

Registered:
Jun 26, 2010

» » Stop autoscroll

Posted: Sep 12, 2010

Reply to: » Stop autoscroll, from Jeff_C
thx for the info! works fine here.