jQuery旋转图像onclick [英] jquery rotate image onclick
本文介绍了jQuery旋转图像onclick的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试实现此功能(旋转90度),但是它失败且没有错误.
该图像位于<a></a>
标记内,该图像已经具有切换jquery功能.
I am trying to achieve this (90 degree rotation), but it fails without errors.
This image is within a <a></a>
TAG where it has already a toggle jquery function.
<?php echo "<img src='down_arrow.png' onclick='$(this).animate({rotate: \"+=90deg\"});' />"; ?>
推荐答案
Consider a jQuery extension such as: jQueryRotate
这将使onclick内的旋转更加容易且更具可读性.
It'll make the rotating inside the onclick much easier and more readable.
这篇关于jQuery旋转图像onclick的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文