Okay
  Public Ticket #907890
Owl Carousel Autorotation Speed Not Read
Closed

Comments

  •  2
    Pat Scullion started the conversation

    Hi,

    I'm trying to change the default auto rotation speed on an Owl Carousel on my shiny new Salient theme to 15000ms (15 seconds), but it doesn't change the speed of the Owl Carousel.

    I've found the culprit, so wanted to share this with you so that you can update it in a future release, and others can work around in the mean time :)

    THE CULPRIT:

    In the HTML, when you set the "Autorotation Speed", it's stored in the "data-autorotation-speed" data attribute:

    <div class="owl-carousel" data-enable-animation="true" data-animation-delay="0" data-autorotate="true" data-autorotation-speed="15000" data-column-padding="0" data-desktop-cols="1" data-desktop-small-cols="1" data-tablet-cols="1" data-mobile-cols="1">

    However, the Javascript function for the Owl Carousel set up in init.js is trying to read an attribute called "data-autorotations-peed":

    var $autoRotateSpeed = $that.attr('data-autorotations-peed');

    The dash is in the wrong place :-) 

    THE FIX:

    Changing the line to the below allows the autorotation speed to be correctly read (as I've sorted out on my site):

    var $autoRotateSpeed = $that.attr('data-autorotation-speed');

    Hope that helps!

    Cheers,

    Pat

  •  8,996
    Tahir replied

    Hey Pat, 

    Thanks for letting us know about the Bug . Have assigned the Ticket to the Developer so this can be looked into for upcoming updates. 

    Best.


    ThemeNectar Support Team