jQuery animate()无法使用颜色 [英] jQuery animate() not working with colors
问题描述
我正在尝试在Confluence 4.1.9中进行一些简单的jQuery测试.
I'm trying to do some simple jQuery test in Confluence 4.1.9.
$("div#test").css("background","#F00");
可以,但是
$("div#test").animate({background:"#F00"});
没有.我想念什么吗?也许animate()在Confluence中不起作用?希望有人可以帮我解决这个问题.谢谢.
doesn't. Am I missing something? Or maybe animate() just doesn't work in Confluence? Hopefully someone can help me out with this. Thank you.
[更新]
谢谢大家,它完全有效! 但是,仅供参考,它在预览中不起作用,这让我有点挠头.好东西,我决定保存该页面,然后看看会发生什么. :P
Thank you guys, it totally worked! But fyi, it did not work in preview, which made me scratch my head a bit. Good thing I decided to save the page and see what happens anyway. :P
推荐答案
jQuery Core不支持开箱即用的彩色动画.
jQuery Core does not support color animations out of the box.
您将必须使用类似 jQuery UI 或独立的
You will have to use something like jQuery UI or a standalone jQuery Color plugin for your call to animate()
to work as expected.
这篇关于jQuery animate()无法使用颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!