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>
希望本文所述對大家的jQuery程序設(shè)計(jì)有所幫助。
- jQuery焦點(diǎn)圖切換特效代碼分享
- jQuery滿屏焦點(diǎn)圖左右滾動特效代碼分享
- jQuery橫向擦除焦點(diǎn)圖特效代碼分享
- jquery京東商城雙11焦點(diǎn)圖多圖廣告特效代碼分享
- jQuery右側(cè)選項(xiàng)卡焦點(diǎn)圖片輪播特效代碼分享
- jQuery實(shí)現(xiàn)仿Alipay支付寶首頁全屏焦點(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)圖無縫滾動切換特效
- jQuery實(shí)現(xiàn)左右切換焦點(diǎn)圖
- jQuery+css3動畫屬性制作獵豹瀏覽器寬屏banner焦點(diǎn)圖
- jQuery實(shí)現(xiàn)標(biāo)題有打字效果的焦點(diǎn)圖代碼
相關(guān)文章
jquery實(shí)現(xiàn)的提示浮層跟隨鼠標(biāo)移動
提示浮層跟隨鼠標(biāo)移動(jquery版)2010-02-02
用jQuery將JavaScript對象轉(zhuǎn)換為querystring查詢字符串的方法
這篇文章主要介紹了用jQuery將JavaScript對象轉(zhuǎn)換為querystring查詢字符串的方法,本文給大家分享兩種方法,非常不錯,具有一定的參考借鑒價值,需要的朋友可以參考下2018-11-11
解析jQuery的三種bind/One/Live事件綁定使用方法
本篇文章主要是對jQuery的三種bind/One/Live事件綁定使用方法進(jìn)行了介紹,需要的朋友可以過來參考下,希望對大家有所幫助2013-12-12
jQuery實(shí)現(xiàn)的滑塊滑動導(dǎo)航效果示例
這篇文章主要介紹了jQuery實(shí)現(xiàn)的滑塊滑動導(dǎo)航效果,涉及jQuery事件響應(yīng)及頁面元素動態(tài)操作相關(guān)實(shí)現(xiàn)技巧,需要的朋友可以參考下2018-06-06
jQuery實(shí)現(xiàn)帶有上下控制按鈕的簡單多行滾屏效果代碼
這篇文章主要介紹了jQuery實(shí)現(xiàn)帶有上下控制按鈕的簡單多行滾屏效果代碼,涉及jquery鼠標(biāo)事件控制頁面翻頁滾動效果的相關(guān)實(shí)現(xiàn)技巧,具有一定參考借鑒價值,需要的朋友可以參考下2015-09-09
基于jquery實(shí)現(xiàn)可定制的web在線富文本編輯器附源碼下載
UEditor的功能非常強(qiáng)大,官方已配備了php,asp,asp.net,java等語言的上傳程序,拿來就可以使用,當(dāng)然ueditor更具有功能插件接口,很輕松地添加自己定義功能到編輯器中,方便項(xiàng)目的不同需求2015-11-11
jQuery+vue.js實(shí)現(xiàn)的多選下拉列表功能示例
這篇文章主要介紹了jQuery+vue.js實(shí)現(xiàn)的多選下拉列表功能,涉及jQuery+vue.js數(shù)據(jù)綁定及事件響應(yīng)相關(guān)操作技巧,需要的朋友可以參考下2019-01-01

