当我应用以下代码时,它设置了正确的条形值但不做任何缓动?
$("#myBar").progressbar({ value: 25, speed: 1500, easing: 'easeOutBounce'});
我错过了什么,任何帮助表示赞赏!
谢谢
解决方案:
我自己解决了
$("#myBar").progressbar({ value: 25, speed: 1500, easing: 'easeOutBounce'});
确实是无效代码(感谢 Orenet!),使用:
$('#myBar div').stop().animate({width: val + '%'},1000, 'easeOutBounce');
没有立即工作,因为带有实际栏的 div 被隐藏了,甚至在没有工作之前对其进行了初始化。目前我只是取消隐藏它。有更好的解决方案吗?