Custom paging stops working after version 1.8.0
See original GitHub issueAdding a custom paging stops working after version 1.8.0.
====================================================================
Working CodePen
Working Codepen, but if I change to version 1.8.1 or higher, it stops working.
====================================================================
Steps to reproduce the problem
- Set up slider as recommended in docs.
- Add a data-title attribute on the slider items
- Add customPaging like so:
customPaging : function(slider, i) { var title = $(slider.$slides[i]).data('title'); return '<a class="pager__item">'+title+'</a>'; }
====================================================================
What is the expected behaviour?
Dots should get the data-title information add replace the dots.
====================================================================
What is observed behaviour?
“undefined” gets output.
====================================================================
Issue Analytics
- State:
- Created 5 years ago
- Comments:11
Top Results From Across the Web
Custom pagination not working - Magento Stack Exchange
This is your problem. In the template you have this line: $data = Mage::getModel('brand/brand')->getCollection();.
Read more >custom paging slider missing config file for react.js
It looks like the component just wants a base url from a config file. The baseUrl needs to be the url path of...
Read more >After upgrading from version 2011 to 2013 custom paging has ...
I have client-side grid inherited from RadGrid. It was fully functional, but after upgrade to the newest Telerik version it stopped working ......
Read more >Navigation | Android Developers
Navigation Safe Args has upgraded the Android Gradle Plugin dependency to rely on 7.0.4 , dropping compatibility for AGP versions before 7.0 ....
Read more >Bug listing with status RESOLVED with resolution OBSOLETE ...
Bug:1523 - "[IDEA] Offload work by distributing trivial ebuild maintenance ... Bug:179497 - "vm-pop3d crashes when checking mail and writes garbage to mail ......
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
What’s happening seems to be that in recent* versions the target “slide” element is wrapped in 2 additional divs. In earlier versions the “Slick-slide” class was just added directly to the target “slide” element.
In the latest version of Slick Carousel, if you want to access data attributes on the original slide, you just need to traverse the DOM by 2 levels.
So here’s the original example:
the fix would be:
or in vanilla JS:
https://codepen.io/drdogbot7/pen/wVrGmB
Hi, this seems to work for me with version 1.9.0:
slideTitle = $(slider.$slides[pageIndex]).find('.slick-slide').data('slide-title');
I have an attribute called “data-slide-title” on the slick-slide and I had to report that text to the bullet button. I found out that an additional
<div>
is injected for some reason I did not understand and didn’t have time to 😃 So i just called a .find(‘.slick-slide’) function to get the job done.