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

Your preferred username that is used when logging in.

Autoscrollable : How do i add the hover/pausing effect on div.Navi too? Created Jun 11, 2009

This thread is solved

Views: 3737     Replies: 4     Last reply Jun 12, 2009  
You must login first before you can use this feature

mtl514

Posts: 5

Registered:
Jun 9, 2009

Autoscrollable : How do i add the hover/pausing effect on div.Navi too?

Posted: Jun 11, 2009

Thank you for the autoscrollable demo, which works well.
I was curious to see how the ':hover stopping the autoscrolling' works.

My real question would be : how can I make the hover effect available on the .Navi Dots too?

(Users will mostly hover on top of the dots instead of the whole image. For exemple, if they click on slide 4, they're automatically scrolled back to slide 1)

mtl514

Posts: 5

Registered:
Jun 9, 2009

» Autoscrollable : How do i add the hover/pausing effect on div.Navi too?

Posted: Jun 11, 2009

Reply to: Autoscrollable : How do i add the hover/pausing effect on div.Navi too?, from mtl514
This seems to create an infinite loop, when i remove the mouse from the navi element

$("div.navi a").hover(function() {
$("div.scrollable").scrollable().getConf().interval = 0;
});

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

Posts: 1867

Registered:
Nov 16, 2007

» » Autoscrollable : How do i add the hover/pausing effect on div.Navi too?

Posted: Jun 11, 2009

Reply to: » Autoscrollable : How do i add the hover/pausing effect on div.Navi too?, from mtl514
'

jQuery's hover function needs two arguments. use mouseover instead.

mtl514

Posts: 5

Registered:
Jun 9, 2009

» » » Autoscrollable : How do i add the hover/pausing effect on div.Navi too?

Posted: Jun 11, 2009

Reply to: » » Autoscrollable : How do i add the hover/pausing effect on div.Navi too?, from tipiirai
It is still creates an infinite loop when i remove the mouse. Maybe it's a conflict with the numbered tab that I just added yesterday, following your other thread's good advice?

$("div.navi a").mouseover(function() {
$("div.scrollable").scrollable().getConf().interval = 0;
});

$("div.navi a").each(function(i) {
$(this).html(i+1);
});
---------------------------------------------------
Here's the full script i'm using :
<script>
// execute your scripts when DOM is ready. this is a good habit
$(function() {

// initialize scrollable
// insert here
$("div.scrollable").scrollable({
size: 1,
items: "#thumbs",

// items are auto-scrolled in x millisecond interval
interval: 5000,

// when last item is encountered go back to first item
loop: true,

// make animation a little slower than the default
speed: 600

// ul.tabs now functions as our navigator
//navi:'div.tabs'

});
$("div.navi a").mouseover(function() {
$("div.scrollable").scrollable().getConf().interval = 0;
});

$("div.navi a").each(function(i) {
$(this).html(i+1);
});


});
</script>

-------------

Thanks for everything!

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

Posts: 1867

Registered:
Nov 16, 2007

» » » » Autoscrollable : How do i add the hover/pausing effect on div.Navi too?

Posted: Jun 12, 2009

Reply to: » » » Autoscrollable : How do i add the hover/pausing effect on div.Navi too?, from mtl514
Try now. Should be fixed in the latest release which was just published.