It is necessary to get the width of all elements of the list li
with the class slide
and put them together. List items are added dynamically with AJAX.
Here is a piece of code:
Slideshow.prototype = { this.slide = this.el.querySelector('.slide'); this.slideWidth(); } slideWidth: function(){ this.slide.offsetWidth; }