2012-01-11 27 views
1

當我應用以下代碼時,它設置了正確的bar值,但是沒有做任何緩動?jQueryUI進度條不會緩解

$("#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'); 

沒有工作immedia與實際酒吧的div一樣被隱藏起來,甚至在沒有工作之前就已經初始化了。目前我只是取消隱藏它。更好的解決方案?

+0

之前已被初始化爲\t $(「#myBar」).progressbar({value:0}); – kritop 2012-01-11 11:18:39

+0

我加了我自己的解決方案! – kritop 2012-01-11 11:55:40

回答

0

解決方案:

我還挺算出來自己

$("#myBar").progressbar({ value: 25, speed: 1500, easing: 'easeOutBounce'}); 

確實是無效的代碼(感謝Orenet!),使用:

$('#myBar div').stop().animate({width: val + '%'},1000, 'easeOutBounce'); 

沒有馬上工作的DIV實際的酒吧甚至在沒有工作之前就已經隱藏起來了。目前我只是取消隱藏它。更好的解決方案?

0

我不認爲你可以使用speedeasing與jQuery的默認progressbar

請閱讀progressbar documentation

+0

http://ask.altervista.org/demo/how-do-you-animate-the-value-for-a-jquery-ui-progressbar/demo2.html - 他使用:.animate({width:wD + '%'},1000,'easeOutBounce');不爲我工作 – kritop 2012-01-11 11:26:15

+0

對我來說,另一個來源是:http://bugs.jqueryui.com/ticket/3469不知道如果這仍然是up2date – kritop 2012-01-11 11:28:00

+1

那麼你應該使用'animate'作爲你給的例子。問題中的代碼無效... – Orentet 2012-01-11 11:29:33