欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jquery實現(xiàn)焦點圖片隨機(jī)切換效果的方法

 更新時間:2015年03月12日 10:14:33   作者:pyawen  
這篇文章主要介紹了jquery實現(xiàn)焦點圖片隨機(jī)切換效果的方法,涉及jQuery插件jquery.easing.1.3.js的使用技巧,具有一定參考借鑒價值,需要的朋友可以參考下

本文實例講述了jquery實現(xiàn)焦點圖片隨機(jī)切換效果的方法。分享給大家供大家參考。具體如下:

1. 運(yùn)行效果如下圖所示:

2.完整實例代碼點擊此處本站下載。

3.完整代碼如下:

復(fù)制代碼 代碼如下:

<!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>&copy; 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è)計有所幫助。

相關(guān)文章

最新評論