S
S
SESRGA2015-11-29 21:36:13
JavaScript
SESRGA, 2015-11-29 21:36:13

How to choose start position of owl-carousel in wordpress?

I put owl-carousel on the site, everything works, the plugin suits, but there is one thing. I have a carousel on my blog and it is necessary that when the page is opened, it is the last added slides that are visible, and not the first ones. While I'm digging through the js files, I can't find anything. Can anyone advise?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Orlov, 2015-12-01
@Brad

There is a method owl.jumpTo(x)

$("#owl-demo").owlCarousel({
      navigation : true,
      slideSpeed : 300,
      paginationSpeed : 400,
      singleItem : true
      });
  var lenCarousel = $("#owl-demo").find('.owl-item').length;
  var owl = $("#owl-demo").data('owlCarousel');
  owl.jumpTo(lenCarousel -1);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question