Cannot read property 'slidesToShow' of undefined
See original GitHub issueshort description of the bug / issue, provide more detail below.
Getting Uncaught TypeError: Cannot read property 'slidesToShow' of undefined
on the first click of a customPaging button, but then the slideshow works fine after that.
====================================================================
http://jsfiddle.net/kyleknighted/pofc1qmv/3/
====================================================================
Steps to reproduce the problem
- on load or click into any tab
- click any
customPaging
button - Check your browser’s Console and see the aforementioned error.
- Click any button again and the slide will change to the proper one
====================================================================
What is the expected behavior?
Not to have an error the first time i click a button
====================================================================
What is observed behaviour?
I’m getting an error.
====================================================================
More Details
- Chrome Version 56.0.2924.87 (64-bit) is the only current tested version, but that’s already too many browsers.
- jquery = 1.12.4
- Slick = 1.6.0
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:11
Top Results From Across the Web
Cannot read properties of null (reading 'add') - Stack Overflow
below is my slider code i got error of can't read property of null reading add kindly do needfull $('.main_images').slick({ slidesToShow: 1, ...
Read more >Cannot read property 'slidesToShow' of undefined
Hi,. I just wanted to report the following javascript error: “Uncaught TypeError: Cannot read property 'slidesToShow' of undefined”.
Read more >Slider not working - WordPress.org
slick.min.js?ver=2.1.2:1 Uncaught TypeError: Cannot read property 'slidesToShow' of undefined at Object.e.slideHandler (slick.min.js?ver=2.1.2:1)
Read more >slick slider error Uncaught TypeError: Cannot read property ...
Uncaught TypeError: Cannot read property 'add' of null in browser ... speed: 300, slidesToShow: 3.1, settings: "unslick", slidesToScroll: 1, ...
Read more >slick - the last carousel you'll ever need - Ken Wheeler
To use lazy loading, set a data-lazy attribute // on your img tags and leave off ... If you already have the "float"...
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
If you use “asNavFor” option, be sure that you provide correct link to another slider, otherwise you get that error.
I was seeing this error when using Ajax and leaving a page… turns out the autoplay is still trying to run after the slick container is now gone… so you get those errors… my fix was to apply:
$('#your-slick-element').slick('slickPause');
when I left the page that has Slick.Note: you might need to do this on both slick elements if you’re using
asNavfor