Problem Most data binding libraries like knockout and Angular allow to dynamically add DOM elements. When this happens, itemslide does not attach events to the newly added items.
example
<div id="carousel">
<li ng-repeat="item in items" ng-bind="item.label"></li>
</div>
/* JS */
$scope.items = [
{label: "one"},{label: "two"},
];
$scope.items.push(,{label: "new item"});
Note: I am aware that addSlide can be used but this defeats the purpose of using such libraries and frameworks.
Possbile solutions
- Somehow listening to the carousel DOM item changes and attach events when change is detected.
- Extending itemslide with a new method that calls
carousel.nav.createEvents(); and slides.reload(); so users call it after they change the array of items, ie add items.
Problem Most data binding libraries like knockout and Angular allow to dynamically add DOM elements. When this happens, itemslide does not attach events to the newly added items.
example
Note: I am aware that addSlide can be used but this defeats the purpose of using such libraries and frameworks.
Possbile solutions
carousel.nav.createEvents();andslides.reload();so users call it after they change the array of items, ie add items.