Home > Web Front-end > JS Tutorial > body text

jQuery image rotation plug-in jQueryRotate.js usage example (with demo download)_jquery

WBOY
Release: 2016-05-16 15:19:03
Original
1710 people have browsed it

The example in this article describes the usage of jQuery image rotation plug-in jQueryRotate.js. Share it with everyone for your reference, the details are as follows:

Recommend a picture rotation plug-in to rotate pictures when browsing photo albums.

The screenshot of the running effect is as follows:

Click here to view the online demonstration .

The specific code is as follows:

<script type="text/javascript">
  $(document).ready(function () {
    $("#images").rotate(45);
    var value = 0
    $("#images1").rotate({
      bind:
       {
        mouseover: function(){
          value +=90;
          $(this).rotate({ animateTo:value})
        }
       }
    });
    $('#button').click(function(){
      $("#images1").rotate({animateTo:parseInt($('#angel').val())});
    });
    function rotation (){
      $("#images2").rotate({
        angle:0,
       animateTo:360,
       callback: rotation,
       easing: function (x,t,b,c,d){
         return c*(t/d)+b;
       }
      });
    }
    rotation();
  });
</script>

Copy after login

The above is just js code, click here for the complete example codeDownload from this site.

Readers who are interested in more content related to jQuery plug-ins can check out the special topic of this site: "Summary of common jQuery plug-ins and usage"

I hope this article will be helpful to everyone in jQuery programming.

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!