必须有一个简单的答案,但我不能让这个光滑的旋转木马工作,即使我把它剥离到最低限度:
https://jsfiddle.net/LNMSchneiderman/4vf4hfy2/1/
附件:
slick-1.6.0/slick/slick.css
slick-1.6.0/slick/slick-theme.css
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" src="slick-1.6.0/slick/slick.min.js"></script>
HTML:
<div class="ss_mobile" id="ss_mobile_westend">
<div><img src="img/westend/mobile/20160317dsOhioRiverBrWestEndBrMag08_forweb.jpg" /></div>
<div><img src="img/westend/mobile/20160317dsOhioRiverBrWestEndBrMag03_forweb.jpg" /></div>
<div><img src="img/westend/mobile/20160317dsOhioRiverBrWestEndBrMag02_forweb.jpg" /></div>
</div>
jquery的:
$(document).ready(function(){
$('#ss_mobile_westend').slick({
});
});
我把头发拉过来。谁能告诉我我做错了什么?
答案 0 :(得分:0)
我认为你的外部资源有错误的路径或其他东西。 我试过这个并且它有效。 https://jsfiddle.net/SimplyFox/54fd1m18/
按以下顺序添加外部资源:
https://code.jquery.com/jquery-1.7.1.js
https://cdn.jsdelivr.net/jquery.slick/1.6.0/slick.css
https://cdn.jsdelivr.net/jquery.slick/1.6.0/slick.min.js
HTML
http://newsinteractive.post-gazette.com/bridges/ohio/img/westend/mobile/20160317dsOhioRiverBrWestEndBrMag08_forweb.jpg
http://newsinteractive.post-gazette.com/bridges/ohio/img/westend/mobile/20160317dsOhioRiverBrWestEndBrMag03_forweb.jpg
http://newsinteractive.post-gazette.com/bridges/ohio/img/westend/mobile/20160317dsOhioRiverBrWestEndBrMag02_forweb.jpg
的jQuery
$(document).ready(function(){
$('.ss_mobile').slick();
});