Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery animate() not working with colors

I'm trying to do some simple jQuery test in Confluence 4.1.9.

$("div#test").css("background","#F00");

works, but

$("div#test").animate({background:"#F00"});

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.

[Update]

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

like image 574
Paul Avatar asked Nov 19 '12 20:11

Paul


1 Answers

jQuery Core does not support color animations out of the box.

You will have to use something like jQuery UI or a standalone jQuery Color plugin for your call to animate() to work as expected.

like image 53
Frédéric Hamidi Avatar answered Oct 07 '22 13:10

Frédéric Hamidi