Comments (4)
Hi Harshal
Thank you for trying out Swiffy Slider.
I agree that the configuration page does not take that into consideration.
In your implementation you just remove the remainder of the indicators from the markup. Simply just include 2 instead of the 6 proposed by the configurator.
Remember that the indicators are not calculated by Swiffy Slider it self - since all of Swiffy slider is simply markup. So it is just the configurator on the doc site that has this problem and not swiffyslider it self.
from swiffy-slider.
I see you compare to Swiper - swiper is a lot of JS that creates markup. Swiffy does it the other way around - you create some markup and Swiffy Slider script will slide that for you. Nothing is calculated.
from swiffy-slider.
Hii @nicped ,
Thank you for a quick response.
I agree that swiffy slider is markup based but the thing is that we work on a CMS platform and all that markup is generated on the fly, server side using an templating engine called sightly. Sightly doesn't support any calculation logic. Any suggestions on how we can tackle this issue?
from swiffy-slider.
Simply remove or hide indicators you do not need using a bit of JS:
let sliderElement = document.getElementById('mySlider');
let container = sliderElement.querySelector(".slider-container");
let indicators = sliderElement.querySelectorAll(".slider-indicators>*");
let pageCount = container.childElementCount / 2; /*2 is the number of slides per page*/
let indicatorIndex = 0;
indicators.forEach(element => {
if(indicatorIndex > pageCount){
element.style.display = "none";
}
indicatorIndex++;
});
from swiffy-slider.
Related Issues (20)
- Infinity scroll HOT 2
- Product Gallery with vertical Thumbnails and Zoom effect HOT 3
- Unminimized distribution lacks vendor specific selector properties HOT 1
- An issue here on small screen devices HOT 5
- Div Wrapper under slider-container HOT 1
- slider-item-show HOT 4
- Lazy Loading Images HOT 1
- A few beginner questions HOT 3
- Dragging an dClick HOT 7
- How to import extensions as module? HOT 4
- Button next and previous not working in RTL HOT 15
- indicators on mobile device fail on Lighthouse check HOT 3
- More than 2 items on mobile HOT 1
- Bug when using slider-item-reveal on slider-item-show3+ HOT 1
- Dynamic Content Loading with XHR HOT 3
- Looping end to start not working on Webkit Browsers HOT 4
- Scrollbar changed layout? HOT 7
- Indicator is not working in mobile view. HOT 1
- screen got stuck after some random arrows click HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiffy-slider.