Home > Web Front-end > JS Tutorial > jQuery image rotation plug-in jQueryRotate.js usage example

jQuery image rotation plug-in jQueryRotate.js usage example

高洛峰
Release: 2017-02-04 09:17:16
Original
1469 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 for rotating pictures when browsing photo albums.

The screenshot of the running effect is as follows:

jQuery image rotation plug-in jQueryRotate.js usage example

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})
        }
       }
    });
    $(&#39;#button&#39;).click(function(){
      $("#images1").rotate({animateTo:parseInt($(&#39;#angel&#39;).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

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

For more jQuery image rotation plug-in jQueryRotate.js usage examples and related articles, please pay attention to the PHP Chinese website!

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