Hello! There is a list of dynamic loadable list, triggered by clicking on a button like this:

<ul> <li>Item</li> <li>Item</li> </ul> 

and there is an adaptive slider

 <div id="owl-carousel" class="owl-carousel"> <div>Слайд1</div> <div>Слайд2</div> <div>Слайд3</div> </div> 
  • How can they be combined so that the elements of the list fit into the elements of the carousel and everything worked out perfectly? All day puzzling how to do it - do not help? how not to twist it - wrap up some divas with divas, we will do it the other way around and in any constructions the system breaks ..

    1 answer 1

    When clicking, add "usefulness" in the slider (for example, you can do this using jQuery - append () ). And then initialize the slider again directly from js.

    • Something I do not really cut in - how do I initialize the slider again directly from js? can be more? - Vasya
    • Suppose the slider is initialized like this: $ ('div'). Slider (); We add what we need in html and once again call $ ('div'). Slider (); - KeyGenQt