well-waterfall 0.1.20 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/waterfall.ts +6 -1
package/package.json
CHANGED
package/src/waterfall.ts
CHANGED
|
@@ -471,11 +471,16 @@ $('[waterfall]').each(function (index) {
|
|
|
471
471
|
// --- SLIDE COUNT ----------------------------
|
|
472
472
|
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
|
|
473
473
|
|
|
474
|
+
// THIS NEEDS TO RUN AFTER THE SLIDERS HAVE BEEN INITIALIZED?
|
|
475
|
+
|
|
474
476
|
document.querySelectorAll('.swiper-wrapper').forEach((swiperWrapper) => {
|
|
477
|
+
console.log('SWIPER WRAPPER');
|
|
475
478
|
swiperWrapper.querySelectorAll('.swiper-slide').forEach((slide, index) => {
|
|
479
|
+
console.log('SWIPER SLIDE');
|
|
476
480
|
const countEl = slide.querySelector('[waterfall-el="slide-count"]');
|
|
477
481
|
if (countEl) {
|
|
478
|
-
|
|
482
|
+
console.log('SWIPER COUNT');
|
|
483
|
+
countEl.textContent = (index + 1).toString();
|
|
479
484
|
}
|
|
480
485
|
});
|
|
481
486
|
});
|