Closed (fixed)
Project:
jCarousel Lite
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
7 Jan 2010 at 08:05 UTC
Updated:
23 May 2012 at 15:39 UTC
Jump to comment: Most recent file
Hi guys, is there a way to stop the auto scroll whenever we mouse over the jcarousel?
there's an example here, but where/how to place the javascript in the jcarousel module?
http://sorgalla.com/projects/jcarousel/examples/static_auto.html
sorry, noob here with very little progamming language :]
thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | jcarousel_pause_auto.patch | 3.1 KB | quicksketch |
Comments
Comment #1
hermes_costell commentedUnfortunately I could never get the module working - I just put the straight javascript into my header.
If you've successfully gotten the module working then:
1: in your config statement (where you set the scrolling speed, wrap, etc) put in "initCallback: mycarousel_initCallback" or initCallback="mycarousel_initCallback" or whatever, depending on how your code is constructed.
2: Get this javascript code here into your header somehow:
Does that make sense?
Comment #2
raimondious commentedThanks for this!
As for getting it into the <head>, I put this into a file called carouselcallback.js and added it to the js directory of my theme. I enable jcarousel by calling jcarousel_add([my arguments]) in a preprocess function in my template.php, so I just added drupal_add_js('[path to my theme]/js/carouselcallback.js', 'theme'); in the same place — it works great.
Comment #3
quicksketchThis sounds like a good feature to include directly in the module now that we include Views support. I think it'd make sense to have this be the default functionality for auto-scrolling carousels, with the option to turn it off is explicitly disabled.
Comment #4
vood002 commentedI'm using 7.x 2.0-alpha 1
When I attempt to pass a function though initCallback i get the javascript error
I'm not opening a new issue b/c I'm not convinced that this isn't just me screwing something up...it works fine without the initCallback option, here is how I'm setting it:
Any idea if this is my method or a bug with jCarousel?
Comment #5
quicksketchA new issue is probably appropriate for your question vood002. Your initCallback needs to be an actual function, not a string.
Comment #6
quicksketchI've committed this patch to add this functionality to our Views integration. You can also utilize it in custom coding applications by setting the "autoPause" option to 1, which will create an initCallback function for you, similar to hermes_costell's suggestion in #1.
Comment #8
saikatbiswas82 commentedThis issue has been fixed. Please take a look here: http://code.google.com/p/jcarausel-lite-pause-on-hover-fixed/