Comments (2)
chatGPT to the rescue :)
$(document).ready(function (e) {
var splide = new Splide( '.splide', {
type : 'loop',
snap : true,
direction : 'ttb',
height: '90vh'
});
splide.mount();
// Function to log the data-slide attribute of the active slide
function logActiveSlide() {
var activeSlide = splide.Components.Elements.slides[splide.index];
var slideData = activeSlide.getAttribute('data-slide');
console.log(slideData);
}
// Log the initial active slide
logActiveSlide();
// Listen for the moved event (triggered when the user hits the previous and next slide buttons)
splide.on('moved', logActiveSlide);
});
from splide.
Hi,
with the option perPage: 2 two slides are displayed per move. how can i read out the html elements here. only the first one is displayed.
from splide.
Related Issues (20)
- Slider is jittery on Mac's Safari and iOS
- Autoplay on pause/play starts from 0 instead of where it was paused
- Wrong width of next slide when using padding and gap
- Keyboard
- Vite "missing exports condition" warning for Svelte Splide HOT 2
- "loop" and checkbox HOT 1
- primary.sync(secondary); and secondary with breakpoints property `destroy: true` not showing or syncing correctly after resize
- Pagination: false does not seem to work as described. HOT 3
- isHTMLElement returns false in grapesjs editor (in chrome/edge not in Firefox)
- Grid extension doesn't work HOT 1
- Autoplay disables after arrow clicked
- Focus center with trimspace false not working correctly when showing slider on click HOT 1
- Typo in the 'wheel' option's description text
- focus "center" causes pagination to generate a dot per item, disregarding perPage
- grid option inside thumbnail slider not working (isNavigation)
- In small carousel, when all slides are visible, layout shifts 10px on init. HOT 1
- Empty spae/gap after refresh and moving slider
- not working
- Inactive pagination items are not accessible via TAB key
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 splide.