我想实现类似于37Signals's Yellow Fade effect.的东西
我使用的是Jquery 1.3.2
The code
(function($) {
$.fn.yellowFade = function() {
return (this.css({backgroundColor: "#ffffcc"}).animate(
{
backgroundColor: "#ffffff"
}, 1500));
}
})(jQuery);
下一个电话显示黄色淡入DOM elment,id为box.
$("#box").yellowFade();
但它只会让它变成黄色.15000毫秒后没有白色背景.
Any idea why it is not working?
Solution
You can use:
$("#box").effect("highlight", {}, 1500);
But you would need to include: