2016-03-16 81 views
0

試圖重新此:JQuery的寬鬆政策沒有發揮作用

http://jsfiddle.net/pvq111u9/

這一次旋轉360度,然後停止...緩和功能不被稱爲...甚至嘗試包括jquery.easing.min .js文件...

<script type="text/javascript" src="http://beneposto.pl/jqueryrotate/js/jQueryRotateCompressed.js"></script> 
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script> 
<img src="picpath" id="image"> 
<script type="text/javascript"> 
    var rotation = function(){ 
    $("#image").rotate({ 
     angle:0, 
     animateTo:360, 
     callback: rotation, 
     easing: function (x,t,b,c,d){ 
     // t: current time, b: begInnIng value, c: change In value, d: duration 
     return c*(t/d)+b; 
     } 
    }); 
    } 
    rotation(); 

回答

0

是否確實關閉了script標籤?工作對我來說fiddle

0

你需要把圖片文件的擴展名,jQuery庫和密切</script>標籤,例如:

<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.1.min.js"></script> 
<script type="text/javascript" src="http://beneposto.pl/jqueryrotate/js/jQueryRotateCompressed.js"></script> 
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script> 


<img src="descarga.jpg" id="image"> 

<script type="text/javascript"> 
    var rotation = function(){ 
    $("#image").rotate({ 
     angle:0, 
     animateTo:360, 
     callback: rotation, 
     easing: function (x,t,b,c,d){ 
     // t: current time, b: begInnIng value, c: change In value, d: duration 
     return c*(t/d)+b; 
     } 
    }); 
    } 
    rotation(); 
    </script>