A method for implementing the random switching effect of focus picture in jquery _jquery

Source: Internet
Author: User

In this paper, the method of implementing the random switching effect of the focus picture in jquery is described. Share to everyone for your reference. Specifically as follows:

1. The operation effect is shown in the following illustration:

2. Complete example code click here to download the site.

3. The complete code is as follows:

Copy Code code as follows:

<! DOCTYPE html>
<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>
<body>
<div id= "Container" >
<div id= "Example" >

<div id= "Slides" >
<div class= "Slides_container" >
<a href= "http://www.flickr.com/photos/jliba/4665625073/" title= "145.365-happy bokeh thursday! | Flickr-photo sharing! "target=" _blank "></a>
<a href= "http://www.flickr.com/photos/stephangeyer/3020487807/" title= "Taxi | Flickr-photo sharing! "target=" _blank "></a>
<a href= "http://www.flickr.com/photos/childofwar/2984345060/" title= "Happy bokeh Day | Flickr-photo sharing! "target=" _blank "></a>
<a href= "http://www.flickr.com/photos/b-tal/117037943/" title= "We Eat Light | Flickr-photo sharing! "target=" _blank "></a>
<a href= "http://www.flickr.com/photos/bu7amd/3447416780/" title= "I must go down to the sea again, to the lonely D the Sky; And all I ask are a tall ship and a star to steer her by. "| Flickr-photo sharing! "target=" _blank "></a>
<a href= "http://www.flickr.com/photos/streetpreacher/2078765853/" title= "Twelve.inch | Flickr-photo sharing! "target=" _blank "></a>
<a href= "http://www.flickr.com/photos/aftab/3152515428/" title= "Save My Love for Loneliness | Flickr-photo sharing! "target=" _blank "></a>
</div>
<a href= "#" class= "prev" ></a>
<a href= "#" class= "Next" ></a>
</div>

</div>
<div id= "Footer" >
<p>for full instructions go to <a href= "http://slidesjs.com" target= "_blank" >http://slidesjs.com</a >.</p>
<p>slider design by Orman Clark at <a href= "http://www.premiumpixels.com/" target= "_blank" >premium Pixels </a>. Can donwload the source PSD at <a href= "http://www.premiumpixels.com/clean-simple-image-slider-psd/" target= "_ Blank ">premium pixels</a></p>
<p>©2010 <a href= "http://nathansearles.com" target= "_blank" >nathan searles</a>. All rights reserved. Slides is licensed under the <a href= "http://www.apache.org/licenses/LICENSE-2.0" target= "_blank" >apache LICENSE </a>.</p>
</div>
</div>
</body>

I hope this article will help you with your jquery programming.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.