is there, or will there be an option for this in the 2.x-dev version?

or is there a way I can accomplish this now?

Comments

trevorleenc’s picture

I tried copying in the code from viewscarousel_style_plugin.inc in the 1.x-dev, but that did not seem to work.

John Carbone’s picture

subscribing

larowlan’s picture

To get this going you need the newer version of jcarousel (0.2.4) that supports calling methods like $('#selector').jcarousel('startAuto', 2);

But you can do it by changing your existing version as so:
Change the section of your jquery.jcarousel.js from

$.fn.jcarousel = function(o) {
  return this.each(function() {
    new $jc(this, o);
  });
}; 

to

$.fn.jcarousel = function(o) {
  if (typeof o == 'string') {
    var instance = $(this).data('jcarousel'), args = Array.prototype.slice.call(arguments, 1);
    return instance[o].apply(instance, args);
  } else
    return this.each(function() {
    $(this).data('jcarousel', new $jc(this, o));
  });
};

Then in your theme or otherwise arrange for the hover callbacks

Drupal.behaviors.YOUR_BEHAVIOUR = function(context) {
  $("YOUR_SELECTOR").hover(
    function() {
      $(this).jcarousel('startAuto', 0);
    },
    function() {
      $(this).jcarousel('startAuto', 2);
    }
  );
}

Make sure you change the YOUR_SELECTOR and the YOUR_BEHAVIOUR appropriately.
The YOUR_SELECTOR is the id/css class of the dom element that the jcarousel is created against, you can find this by inspecting Drupal.settings.jcarousel in firebug

chris.slater’s picture

For those who run into this issue now. In the options array, use the option: 'autoPause' => true,
I had to hunt around in the view for that, because I couldn't find the documentation mentioning it.