admin管理员组文章数量:1332345
I have this code: /
Hence, a simple HIDDEN TO VISIBLE jQuery Script.
What I want to know how to do is have an image in the "expand-one" Class that would rotate 90 Degrees so the image would be facing down while that CLASS is VISIBLE, then once it bees HIDDEN it would rotate back to it's original spot.
Any idea(s) anyone?
Thank you so much! Aaron
I have this code: http://jsfiddle/Q4PUw/2/
Hence, a simple HIDDEN TO VISIBLE jQuery Script.
What I want to know how to do is have an image in the "expand-one" Class that would rotate 90 Degrees so the image would be facing down while that CLASS is VISIBLE, then once it bees HIDDEN it would rotate back to it's original spot.
Any idea(s) anyone?
Thank you so much! Aaron
Share Improve this question asked Dec 13, 2011 at 20:26 Aaron BrewerAaron Brewer 3,67719 gold badges51 silver badges79 bronze badges2 Answers
Reset to default 3You could do this with css: http://jsfiddle/Tentonaxe/Q4PUw/6/
$('.expand-one').toggle(function() {
$('.content-one').slideDown('slow');
$(this).find("img").css({
"-webkit-transform": "rotate(180deg)",
"-moz-transform": "rotate(180deg)",
"filter": "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"
});
}, function() {
$('.content-one').slideUp('slow');
$(this).find("img").css({
"-webkit-transform": "rotate(0deg)",
"-moz-transform": "rotate(0deg)",
"filter": "progid:DXImageTransform.Microsoft.BasicImage(rotation=0)"
});
});
You can do that with plain HTML (it doesnt have ultra slow fading):
<details>
<summary>Click Here To Display The Content</summary>
Hidden Content here, can be rotated with CSS3
</details>
本文标签: javascriptRotate Image(s) OnClick With jQueryStack Overflow
版权声明:本文标题:javascript - Rotate Image(s) OnClick With jQuery? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742326960a2453917.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论