Home > Web Front-end > JS Tutorial > jquery method to achieve random switching effect of focus image_jquery

jquery method to achieve random switching effect of focus image_jquery

WBOY
Release: 2016-05-16 16:10:12
Original
1097 people have browsed it

The example in this article describes how jquery implements the random switching effect of the focus image. Share it with everyone for your reference. The details are as follows:

1. The operation effect is shown in the figure below:

2. Click here for the complete example codeDownload from this site.

3. The complete code is as follows:

Copy code The code is as follows:




   
    Slides, A Slideshow Plugin for jQuery
   
   
   
   
    <script><br>          <br>         $(function(){<br>             var easings = [];<br>             var row = 0;<br>             for(var x in jQuery.easing){<br>                 if (x != 'linear' && x != 'swing') {<br>                     easings[row ] = x;<br>                 }<br>             } <br>              <br>             $('#slides').slides({<br>                 preload: true,<br>                 preloadImage: 'img/loading.gif',<br>                 play: 5000,<br>                 pause: 2500,<br>                 slideEasing: "swing", <br>                 slideSpeed : 2000,<br>                 hoverPause: true,<br>                 animationComplete: function(current) {<br>                      var index = Math.floor(Math.random() * easings.length);<br>                      jQuery.easing.def = easings[index];<br>                 }<br>             });<br>         });<br>     </script>


   

       

            New Ribbon
           

               

                    Slide 1
                    Slide 2
                    Slide 3
                    Slide 4
                    Slide 5
                    Slide 6
                    Slide 7
               

               
               
           

            Example Frame
       

       
   



希望本文所述对大家的jQuery程序设计有所帮助。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template