D
D
Denis Omega2019-08-12 20:53:57
PHP
Denis Omega, 2019-08-12 20:53:57

Carousel of ul list items?

Good time guys, I need your help to find Carusel that can load data from JSON .
The task is this ..
There is a Mysql selection from the database that displays data in a Json array.
It is necessary to display 5 elements from the array on the page and then scroll from the array.

Maybe someone has already done this share the solution ...
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lord_Dantes, 2019-08-12
@Lord_Dantes

Use Owl.Carousel2
Next, when you insert your JSON elements, do the following:

$(".yourcarouselclass").trigger('destroy.owl.carousel');
$('.yourcarouselclass').owlCarousel({ });

In this way, the carousel will receive the data, error, and re-create itself. :)

E
Eugene Chefranov, 2019-08-12
@Chefranov

Use https://learn.javascript.ru/fetch to load json, and choose any slider you like. After loading json data, initialize the slider.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question