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

Discussion in 'Javascript' started by Czterysta Czwarty, Feb 7, 2011.

  1. 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?
    Czterysta Czwarty, Feb 7, 2011
    #1
    1. Advertising

  2. 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
    Andreas Bergmaier, Feb 7, 2011
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TS
    Replies:
    2
    Views:
    3,185
    sourabhsorate
    Dec 16, 2008
  2. AAaron123

    TreeNode colors come from anchor colors

    AAaron123, Aug 7, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    528
    darrel
    Aug 7, 2008
  3. ZelluX
    Replies:
    3
    Views:
    1,859
    Peter Otten
    Dec 1, 2008
  4. Aaron Gray
    Replies:
    20
    Views:
    380
    Lasse Reichstein Nielsen
    Jul 27, 2008
  5. lorlarz
    Replies:
    6
    Views:
    208
    David Mark
    Mar 25, 2010
Loading...

Share This Page