jquery rotate image onclick

前端 未结 7 697
难免孤独
难免孤独 2020-12-17 10:30

I am trying to achieve this (90 degree rotation), but it fails without errors. This image is within a TAG where it has already a toggle jque

7条回答
  •  执念已碎
    2020-12-17 11:09

    checkout this: JqueryRotate

    this have little things to do, you can see one code example in the image itself.

    enter image description here

    So in your case you can do this:

    $(document).ready(function(){
       $('img[src^="down_arrow"]').click(function(){
          $(this).rotate(90);
       });
    });
    

提交回复
热议问题