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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/waterfall.ts +6 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "well-waterfall",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "An attribute-based wrapper of SwiperJS for Webflow",
5
5
  "main": "waterfall.js",
6
6
  "scripts": {
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
- countEl.textContent = index.toString();
482
+ console.log('SWIPER COUNT');
483
+ countEl.textContent = (index + 1).toString();
479
484
  }
480
485
  });
481
486
  });