繁体   English   中英

jQuery旋转后隐藏图像

[英]Jquery hide image after rotation

我有一张图片,可在点击事件中旋转360度。 图像旋转完成后,我希望该图像消失。 有什么建议么?

$("#refresh").rotate({
   bind:
     {
        click: function(){
            $(this).rotate({ angle:0,animateTo:720,easing: $.easing.easeInOutExpo });
            $(this).fadeOut("slow");
        }
     }

});

的HTML

<div class="span4" style="float:right">

    <img src="assets/img/refresh_btn.png" id="refresh" width="70" height="70"/> 

</div>

任何帮助都会很棒。 谢谢!

我假设您正在使用此? http://code.google.com/p/jqueryrotate/wiki/Documentation

在这种情况下,请使用在完成时触发的回调。 像这样:

$("#refresh").rotate({
   bind:
     {
        click: function(){
            $(this).rotate({ angle:0,animateTo:720,easing: $.easing.easeInOutExpo });
            $(this).fadeOut("slow");
        },
        callback: function(){
            $(this).hide();
        },
     }

});

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM