Stopping the carousel on hover

gausarts - May 1, 2008 - 15:23
Project:Nodecarousel
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

This would be a great feature to stop the carousel when we hover over the animated carousel. Any plan or hack to do that?

Thank you sharing.

#1

jcfiala - May 1, 2008 - 15:34

Hmm. Well, you could do a mouseover on the carousel that would turn off the autoscroll...

I'd have to consider it.

#2

deviantintegral - May 29, 2008 - 19:33

This is also something I'm interested in. I was thinking that the carousel would stop when an index was clicked, but a mouseover would achieve a similar effect.

--Andrew

#3

mulogic - June 1, 2008 - 21:41

I am also looking for this feature. would be great, if auto scroll stops after the user clicks an index. This may give time for user to read the slide.

thanks

#4

Mike Sances - August 12, 2008 - 15:38

Also in need of this.

Perhaps the code from this comment would be helpful: http://drupal.org/node/184428#comment-615804

Just paste a variant of this in the "Javascript Scroll Event Handler:" field on the nodecarousel block settings page?

#5

phonydream2 - September 3, 2008 - 20:26

Subscribing

#6

Rick Hood - September 11, 2008 - 19:01
Title:Stopping the carousel on hover» Just chiming that I could use this too.

Just chiming in that I could use this myself. Not good enough with JavaScipt to figure this out myself. Also not sure how to implement comment #4 above.

#7

Rick Hood - September 11, 2008 - 19:00
Title:Just chiming that I could use this too. » Stopping the carousel on hover

Sorry changed title by mistake - changing back.

#8

ultimateboy - November 5, 2008 - 22:41
Status:active» postponed

Interesting idea.. will keep in mind for the next release.

#9

artscientific - November 20, 2008 - 23:15

This would be a Very Good Thing(tm)

#10

JaceRider - January 26, 2009 - 17:03

Yeah, very easy to get working.

Search nodecarousel.module for:

    jQuery('div#nc_last_%d').click(function(e) {
      carousel.scroll($("#nc_" + carouselName + " li").length, true);
    });

And add the below code directly after:

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });

Would be a simple addition to module core -- ideally with an option to enable/disable the functionality in the module admin.

#11

iamwhoiam - January 29, 2009 - 11:02

thanks!

#12

Jason Ruyle - February 20, 2009 - 19:39

I wanted to know if anyone has a suggestion on how to get this working with the class index_control_list?
The index_control information is created after the hover function is created, so if I try and put that code in, it says the function hasn't been created.

Not sure how to go about fixing this.

#13

deviantintegral - April 8, 2009 - 15:55
Version:5.x-1.0» 5.x-1.x-dev
Category:support request» feature request
Status:postponed» needs work

Here's a patch against 5.x-dev of the code in #10. It doesn't implement this as a toggleable setting yet, though IMO carousels should never move when it has focus anyways.

AttachmentSize
253553_stop_on_hover_5.x.patch 819 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.