0

I am working with a customer on adjusting the speed of their logo carousel, but my knowledge of jQuery is limited. I've researched it a bit on here (stackoverflow) and in the Sorgolla documentation (http://sorgalla.com/projects/jcarousel/), but I cannot figure out how to add in these properties to the existing script. The customer would just like the time between scrolls lengthened, which I'm thinking is the 'auto' property?

Any help/guidance would be much appreciated


The script used in this carousel is as follows:

$(document).ready(function(){

  $('#mycarousel').css('visibility', 'visible');

}); 

An example can be found on the live site: Http://www.trustivo.com

3 Answers 3

3

I looked in the source of your page, and the code that actually starts the carousel looks like this:

jQuery('#mycarousel').jcarousel({
    visible:6,
    auto: 4,
    scroll:6,
    wrap: 'circular',
    animation:"slow",
    initCallback: mycarousel_initCallback
});

The auto: 4 means scrolling happens every 4 seconds. Increase the number to make it scroll less frequently.

3
  • @SamTyson Here is the example from the docs, which clearly uses the auto option: sorgalla.com/projects/jcarousel/examples/static_auto.html Jun 29, 2012 at 15:53
  • I totally missed that section! Thanks so much for the quick reply, that is a big help
    – jjsears6
    Jun 29, 2012 at 17:53
  • If my answer is the one you used, please mark it as accepted by clicking the check mark in the left column. Thanks! Jun 29, 2012 at 17:58
1

You can change the carousel speed by changing the animation option. It defaults to 400ms, but can be overriden like this:

$("#carousel").jcarousel({ animation: 400 });
2
  • The OP is using .jcarousel, not .carousel Jun 29, 2012 at 15:40
  • Thanks for the quick reply! I'm going to edit the header code as mentioned below, but I do appreciate the input.
    – jjsears6
    Jun 29, 2012 at 17:59
0

Try:

$(document).ready(function() {

    // $('#mycarousel').css('visibility', 'visible');

    $('#mycarousel').jcarousel({
        auto: 5
    });
});

The documentation is not fully clear about the 'auto' config variable. Like many other similar plugins, the value may be in milliseconds, meaning that you have to set it 5000 (instead of 5) to get 5 seconds.

I don't think you need the first line, so I've commented it out, but add it back if necessary.

1
  • Thank you for the quick reply! I'm going to try editing the code in the header as mentioned below, but i will fall back on this answer if need be.
    – jjsears6
    Jun 29, 2012 at 17:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.