[jQuery] animate function doesn't work with colors and anchors

  • Thread starter Czterysta Czwarty
  • Start date
C

Czterysta Czwarty

Hi!

I have problem with animate background color in navigate anchors:
$(this).animate({ backgroundColor: "black" }, 1000);
with size (like width) works correct.

Why I should to do to fade backgdround color?
 
A

Andreas Bergmaier

Am 07.02.2011 14:09 A.D., schrieb Czterysta Czwarty:
Hi!

I have problem with animate background color in navigate anchors:
$(this).animate({ backgroundColor: "black" }, 1000);
with size (like width) works correct.
http://api.jquery.com/animate/ says:
All animated properties should be animated to a single numeric value,
except as noted below; most properties that are non-numeric cannot be
animated using basic jQuery functionality. (For example, width, height,
or left can be animated but background-color cannot be.) Property values
are treated as a number of pixels unless otherwise specified. The units
em and % can be specified where applicable.
Why I should to do to fade backgdround color?
http://jqueryui.com/demos/animate/ provides a interface for that.

Bergi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top