[英]JQuery easing not functioning
Trying to recreate this: 尝试重新创建此:
http://jsfiddle.net/pvq111u9/ http://jsfiddle.net/pvq111u9/
It rotates once 360 degrees then stops ... the easing function isn't being called ... even tried including jquery.easing.min.js ... 它会旋转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();
You need to put the extension file of the picture, the jquery library and the close </script>
tag, Example: 您需要放置图片的扩展文件,jquery库和close
</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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.