jsor / jcarousel

Riding carousels with jQuery.
https://sorgalla.com/jcarousel/
MIT License
1.99k stars 736 forks source link

pagination with individual text instead of page numbers #757

Closed giukra96 closed 9 years ago

giukra96 commented 9 years ago

Is it possible to set the pictures name as the navigation text resp. the pagination text? if yes, how can I achieve this? I am working with the swiss desktop cms "weblica" but they do not have an option for a slider like yours.

jsor commented 9 years ago

You can use the item options to control the markup of the pagination links. The second argument carouselItems is a jQuery object containing the carousel items of the current page.

Example:

$('.jcarousel-pagination').jcarouselPagination({
    item: function(page, carouselItems) {
        return '<li><a href="#' + page + '">' + carouselItems.eq(0).attr('title') + '</a></li>';
    }
});