[Silk UI Web] Carousel: How to initially navigate to an element?

[Silk UI Web] Carousel: How to initially navigate to an element?

  
Forge Component
(50)
Published on 7 Aug (12 days ago) by OutSystems R&D
50 votes
Published on 7 Aug (12 days ago) by OutSystems R&D

Hi guys,


I would like to know how to navigate to the X-th element of the carousel.

I'm trying to use jquery scrollLeft but, after that, the scroll gets all messed up. Any easy way?


Tks

Hi!

You can use the Owl Carousel API to achieve that behavior :)

http://www.jqueryscript.net/demo/Powerful-Customizable-jQuery-Carousel-Slider-OWL-Carousel/index.html

Hi,

Correct me if I'm wrong but I can simulate the navigation clicks, with the goTo function, but the pace depends on the screen size which turns difficult to have it working on a generic way.

Do you see any other way?


Tks



The pace? You mean the speed of the transition? It will depend on the screen size but should not be noticeable if the gap is not too big. Using the default 300-500 should be enough.

Sorry, I didn't explain myself clearly. The API doesn't help because it only allows me to "click" on the navigation arrows and, since the right and left movement "width" depends on the screen resolution, it's quite hard to automatically navigate to the desired element.

Nevertheless, I've solved this using the same mechanism of owl, which is a css transaction on x-axis. 

Thanks