JQuery 列表查看新项目闪烁



我正在尝试将 AJAX 添加到 JQuery 列表视图闪烁黄色,但我似乎无法让它工作。谁能指出我正确的方向?

http://jsfiddle.net/zFybm/

根据 jQuery 页面,

"宽度、高度或左侧可以动画化,但背景色不能,除非使用 jQuery.Color() 插件)"http://api.jquery.com/animate/

你可以查看jQuery.Color(),或者使用以下其他解决方案之一:

http://www.bitstorm.org/jquery/color-animation/

http://desizntech.info/2009/06/playing-with-jquery-color-plugin-and-color-animation/

使用此代码..它工作正常

function newitem(){
var text='<li><p>new</p></li>';
var elem=$(text);
elem.css("background", "#FFA");
$('#list').prepend(elem);
$('#list').listview("refresh");
elem.animate({backgroundColor: "#EEE"});
}
newitem();​

最新更新