我试图弄清楚为什么unslick方法在使用响应断点时不起作用.
@H_404_17@解决方法
<div id="skills" class="sectionWrapperInner"> <div>Slide 1</div> <div>Slide 2</div> <div>Slide 3</div> </div>
I get error TypeError: b.$slides is null when i am trying to resize the window.
下面是我正在使用的jQuery Slick的代码
$(document).ready(function(){ function slickIt(){ if(!$('.sectionWrapperInner').hasClass('slick-initalized')){ setTimeout(function(){ $('.sectionWrapperInner').slick({ responsive: [ { breakpoint: 9999,settings: "unslick" },{ breakpoint: 1199,settings: { mobileFirst: true,slidesToShow: 4,slidesToScroll: 4,dots: true,focusOnSelect: true,infinte: true,} },{ breakpoint: 640,slidesToShow: 2,slidesToScroll: 2,] }); },100) } } $(window).bind('resize',function(){ slickIt(); }); slickIt(); });
任何想法,为什么我总是在调整屏幕大小.