Comments (7)
You could try to add it directly in the HTML code you create.
from slider-pro.
Yea, I tried that, I am doing CSS animations once the class .sp-selected gets added so if I hard code it then they don't animate. I was thinking if index 0 then add class .sp-selected
I'll keep trying thank you.
from slider-pro.
You can use the init
event to add the class immediately after the initialization. You will need to pass the handler to this event in the list of options because if you pass it later it will be too late and it won't fire:
$( '.slider-pro' ).sliderPro({
...
init: function() {}
});
from slider-pro.
How do I get the index in the init?
So then I can do if( index === 0 ) { ... }
from slider-pro.
The init
is fired only once, so you don't need to check the index; you simply add the class to the first slide.
from slider-pro.
The 'sp-selected' class is added by default to the initially selected slide in version 1.2.0.
from slider-pro.
@davidghi Awesome! Thank you
from slider-pro.
Related Issues (20)
- Capture event on Button Click Full Screen HOT 1
- Why your Website is Down? HOT 6
- How to change autoplayDelay value after some time HOT 1
- Transition on fullscreenchange? HOT 1
- Thumbnails and Slides scramble. HOT 1
- slides over each other when screen resolution is 1920*1080 HOT 1
- Google indexing HOT 4
- How to do when hover on thumbnail slider will change and when click thumbnail it will go to single blog HOT 8
- Center Image inside slide HOT 5
- No Event for SlideMoveComplete HOT 1
- Get Image Data HOT 1
- ES5 or ES6 Module Import HOT 1
- sliderPro is not a function HOT 5
- jQuery Minimal Library for BQ Slider Pro HOT 2
- Edge and Brave downgrading images but Chrome itself and Firefox do not HOT 1
- Is there a Vue version of slider pro? HOT 1
- Safari issue v15 HOT 1
- how to move 2 images at a time? HOT 3
- Angular component that is loading slider-pro images dynamically from a parent component? HOT 1
- random order at every page refresh HOT 2
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 slider-pro.