Hi, I have a snippet that demonstrates the following:
If you want to add dynamically, either by using AJAX or a click event handler that adds new items to carousel, you have to initialize the carousel after each insertion. Then the click listeners of the prev/next navigation button are bind many times and thus on click the event is triggered multiple times.
Hi, I have a snippet that demonstrates the following:
If you want to add dynamically, either by using AJAX or a click event handler that adds new items to carousel, you have to initialize the carousel after each insertion. Then the click listeners of the prev/next navigation button are bind many times and thus on click the event is triggered multiple times.
Maybe I miss something but shouldn't the new carousel initialization discard any previous listeners? Is there another way to do this?