Accessing Current Slide Data Attributes in onAfterChange after 1.4 update
See original GitHub issuePrevious method which was working before the update:
console.log($(slide.$slides.get(index)).attr('id'))
No longer works. Any suggestions as to how I might make this happen? Based on docs, I tried to pull .data() from
var currentSlide = $('.your-element').slick('slickCurrentSlide');
but that didn’t work either.
Issue Analytics
- State:
- Created 9 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Getting data-attributes from slides in slick carousel
I've tried everything I know to get the data attribute using the new method. Author show me how to get the current Slide...
Read more >slick - the last carousel you'll ever need - Ken Wheeler
slick is a responsive carousel jQuery plugin that supports multiple breakpoints, CSS3 transitions, touch events/swiping & much more!
Read more >Using data attributes - Learn web development | MDN
To get a data attribute through the dataset object, get the property by the part of the attribute name after data- (note that...
Read more >https://www.aamu.edu/_resources/ldp/galleries/slic...
Data Attribute Settings In slick 1.5 you can now add settings using the data-slick ... of current slide set, if multiple `slidesToShow`) after...
Read more >Data Attributes | jQuery Mobile API Documentation
These attributes are completely optional; calling plugins manually and passing options directly is also supported. To avoid naming conflicts with other plugins ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for contributing, but please provide a jsfiddle in future 😄
Ok thanks, Simon. I’ll do that in the future. I’m still learning 😓. Thank you both for your help @kenwheeler.