jQuery循环2完全不工作

ldxq2e6h  于 2023-01-20  发布在  jQuery
关注(0)|答案(2)|浏览(136)

我以前用过很多次Cycle2,没有任何问题,但是由于某种原因我根本不能让它工作。我已经包括了最新的JQuery CDN,Cycle2,Cycle2 Shuffle和JQuery Easing。

<div class="cycle-slideshow" data-cycle-timeout="5000" data-cycle-fx="shuffle" data-cycle-shuffle-top="-125" data-cycle-shuffle-left="0" data-cycle-speed="1100" data-cycle-pause-on-hover="true" data-cycle-slides="> div.homepage-carousel-item" data-cycle-swipe="true"
  data-cycle-ease-out="easeOutBack" data-cycle-easing="easeInOutBack">
  <div class="homepage-carousel-item"><img alt="" src="https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no-mo-rj-c0xffffff/photo.jpg"></div>
  <div class="homepage-carousel-item"><img alt="" src="https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no-mo-rj-c0xffffff/photo.jpg"></div>
  <div class="homepage-carousel-item"><img alt="" src="https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no-mo-rj-c0xffffff/photo.jpg"></div>
</div>

我有一个jsfiddle set up here。我是不是错过了一些超级明显的东西?

x9ybnkn6

x9ybnkn61#

请试试这个...

img {
  width: 250px;
  height: auto;
}
.homepage-carousel-item{
  background:#fff;
}
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/2.1.6/jquery.cycle2.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/2.1.6/plugin/jquery.cycle2.carousel.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/2.1.6/plugin/jquery.cycle2.swipe.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/2.1.6/plugin/jquery.cycle2.shuffle.min.js"></script>

<div class="cycle-slideshow" data-cycle-timeout="5000" data-cycle-fx="shuffle" data-cycle-shuffle-top="-125" data-cycle-shuffle-left="0" data-cycle-speed="1100" data-cycle-pause-on-hover="true" data-cycle-slides="> div.homepage-carousel-item" data-cycle-swipe="true"
data-cycle-ease-out="easeOutBack" data-cycle-easing="easeInOutBack">
  <div class="homepage-carousel-item"><img alt="" src="https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no-mo-rj-c0xffffff/photo.jpg"></div>
  <div class="homepage-carousel-item"><img alt="" src="https://www.google.com/gmail/about/images/any-device.jpg"></div>
  <div class="homepage-carousel-item"><img alt="" src="https://www.google.co.in/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png"></div>
</div>

JSFiddle演示:https://jsfiddle.net/geogeorge/o2s54ctw/

xpcnnkqh

xpcnnkqh2#

您访问的网址不正确!

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

<script src="https://malsup.github.io/jquery.cycle2.js"></script>

相关问题