jquery實(shí)現(xiàn)焦點(diǎn)圖片隨機(jī)切換效果的方法
本文實(shí)例講述了jquery實(shí)現(xiàn)焦點(diǎn)圖片隨機(jī)切換效果的方法。分享給大家供大家參考。具體如下:
1. 運(yùn)行效果如下圖所示:
2.完整實(shí)例代碼點(diǎn)擊此處本站下載。
3.完整代碼如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Slides, A Slideshow Plugin for jQuery</title>
<link rel="stylesheet" href="css/global.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script src="http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js"></script>
<script src="js/slides.min.jquery.js"></script>
<script>
$(function(){
var easings = [];
var row = 0;
for(var x in jQuery.easing){
if (x != 'linear' && x != 'swing') {
easings[row++] = x;
}
}
$('#slides').slides({
preload: true,
preloadImage: 'img/loading.gif',
play: 5000,
pause: 2500,
slideEasing: "swing",
slideSpeed : 2000,
hoverPause: true,
animationComplete: function(current) {
var index = Math.floor(Math.random() * easings.length);
jQuery.easing.def = easings[index];
}
});
});
</script>
</head>
<body>
<div id="container">
<div id="example">
<img src="img/new-ribbon.png" width="112" height="112" alt="New Ribbon" id="ribbon">
<div id="slides">
<div class="slides_container">
<a title="145.365 - Happy Bokeh Thursday! | Flickr - Photo Sharing!" target="_blank"><img src="http://slidesjs.com/examples/standard/img/slide-1.jpg" width="570" height="270" alt="Slide 1"></a>
<a title="Taxi | Flickr - Photo Sharing!" target="_blank"><img src="http://slidesjs.com/examples/standard/img/slide-2.jpg" width="570" height="270" alt="Slide 2"></a>
<a title="Happy Bokeh raining Day | Flickr - Photo Sharing!" target="_blank"><img src="http://slidesjs.com/examples/standard/img/slide-3.jpg" width="570" height="270" alt="Slide 3"></a>
<a title="We Eat Light | Flickr - Photo Sharing!" target="_blank"><img src="http://slidesjs.com/examples/standard/img/slide-4.jpg" width="570" height="270" alt="Slide 4"></a>
<a title="“I must go down to the sea again, to the lonely sea and the sky; and all I ask is a tall ship and a star to steer her by.” | Flickr - Photo Sharing!" target="_blank"><img src="http://slidesjs.com/examples/standard/img/slide-5.jpg" width="570" height="270" alt="Slide 5"></a>
<a title="twelve.inch | Flickr - Photo Sharing!" target="_blank"><img src="http://slidesjs.com/examples/standard/img/slide-6.jpg" width="570" height="270" alt="Slide 6"></a>
<a title="Save my love for loneliness | Flickr - Photo Sharing!" target="_blank"><img src="http://slidesjs.com/examples/standard/img/slide-7.jpg" width="570" height="270" alt="Slide 7"></a>
</div>
<a href="#" class="prev"><img src="img/arrow-prev.png" width="24" height="43" alt="Arrow Prev"></a>
<a href="#" class="next"><img src="img/arrow-next.png" width="24" height="43" alt="Arrow Next"></a>
</div>
<img src="img/example-frame.png" width="739" height="341" alt="Example Frame" id="frame">
</div>
<div id="footer">
<p>For full instructions go to <a target="_blank">http://slidesjs.com</a>.</p>
<p>Slider design by Orman Clark at <a target="_blank">Premium Pixels</a>. You can donwload the source PSD at <a target="_blank">Premium Pixels</a></p>
<p>© 2010 <a target="_blank">Nathan Searles</a>. All rights reserved. Slides is licensed under the <a target="_blank">Apache license</a>.</p>
</div>
</div>
</body>
</html>
希望本文所述對(duì)大家的jQuery程序設(shè)計(jì)有所幫助。
- jQuery焦點(diǎn)圖切換特效代碼分享
- jQuery滿(mǎn)屏焦點(diǎn)圖左右滾動(dòng)特效代碼分享
- jQuery橫向擦除焦點(diǎn)圖特效代碼分享
- jquery京東商城雙11焦點(diǎn)圖多圖廣告特效代碼分享
- jQuery右側(cè)選項(xiàng)卡焦點(diǎn)圖片輪播特效代碼分享
- jQuery實(shí)現(xiàn)仿Alipay支付寶首頁(yè)全屏焦點(diǎn)圖切換特效
- jquery實(shí)現(xiàn)多屏多圖焦點(diǎn)圖切換特效的方法
- jQuery插件bxSlider實(shí)現(xiàn)響應(yīng)式焦點(diǎn)圖
- jQuery插件Skippr實(shí)現(xiàn)焦點(diǎn)圖幻燈片特效
- jQuery插件Elastislide實(shí)現(xiàn)響應(yīng)式的焦點(diǎn)圖無(wú)縫滾動(dòng)切換特效
- jQuery實(shí)現(xiàn)左右切換焦點(diǎn)圖
- jQuery+css3動(dòng)畫(huà)屬性制作獵豹瀏覽器寬屏banner焦點(diǎn)圖
- jQuery實(shí)現(xiàn)標(biāo)題有打字效果的焦點(diǎn)圖代碼
相關(guān)文章
JQueryMiniUI按照時(shí)間進(jìn)行查詢(xún)的實(shí)現(xiàn)方法
下面小編就為大家?guī)?lái)一篇JQueryMiniUI按照時(shí)間進(jìn)行查詢(xún)的實(shí)現(xiàn)方法。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2017-06-06jquery ajax雙擊div可直接修改div中的內(nèi)容
這篇文章主要介紹了jquery ajax雙擊div直接修改div中內(nèi)容的相關(guān)方法,感興趣的小伙伴們可以參考一下2016-03-03在easyUI開(kāi)發(fā)中,出現(xiàn)jquery.easyui.min.js函數(shù)庫(kù)問(wèn)題的解決辦法
easyUI是jquery的一個(gè)插件,是民間的插件,easyUI使用起來(lái)很方便,里面有網(wǎng)頁(yè)制作的最重要的三大方塊:javascript代碼、html代碼和Css樣式,但是很容易出現(xiàn)jquery.easyui.min.js函數(shù)庫(kù)問(wèn)題,小編教大家如何解決問(wèn)題,需要的朋友可以參考下2015-09-09jquery自定義插件開(kāi)發(fā)之window的實(shí)現(xiàn)過(guò)程
這篇文章主要介紹了jquery自定義插件開(kāi)發(fā)之window的實(shí)現(xiàn)過(guò)程的相關(guān)資料,需要的朋友可以參考下2016-05-05簡(jiǎn)單易擴(kuò)展可控性強(qiáng)的Jquery轉(zhuǎn)盤(pán)抽獎(jiǎng)程序
今天小編就為大家分享一篇關(guān)于簡(jiǎn)單易擴(kuò)展可控性強(qiáng)的Jquery轉(zhuǎn)盤(pán)抽獎(jiǎng)程序,小編覺(jué)得內(nèi)容挺不錯(cuò)的,現(xiàn)在分享給大家,具有很好的參考價(jià)值,需要的朋友一起跟隨小編來(lái)看看吧2019-03-03基于jQuery實(shí)現(xiàn)掛號(hào)平臺(tái)首頁(yè)源碼
這篇文章主要介紹了基于jQuery實(shí)現(xiàn)掛號(hào)平臺(tái)首頁(yè)源碼,非常不錯(cuò),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2020-01-01