簡體   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