0

Using Owl Carousel I wanted to use text from the alt="Image Alt Text" or title="Image Title Text" of images as pagination instead of bullets / circles. In the process of writing the question and fiddles I sussed it. See below. Hope this is useful to someone else.

DEMO FIDDLE

Victor
  • 714
  • 2
  • 10
  • 25

2 Answers2

5

To prevent the pager disappearing whenever the slider is re-sized (such as on a responsive site), add this to your owl config:

afterUpdate: customPager

Here's an updated fiddle: http://jsfiddle.net/peterhay/xrqjaxk7/

Note: Someone deleted this comment last time. Presumably for not answering the question. However it wasn't really a question to begin with and I think this is an important addition to the original post, which could save someone a lot of headache. I don't currently have the "50 reputation" required to comment on a question.

Peter Hay
  • 66
  • 1
  • 3
0

The custom function works with a single item:

singleItem: true,

But if I have say 4 items then it only shows the first 2 as menu paginations.

user2760338
  • 235
  • 1
  • 4
  • 13