Bug Tracker

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#839 closed bug (fixed)

Setting opacity fails in jQuery 1.1

Reported by: [email protected] Owned by:
Priority: major Milestone: 1.1
Component: core Version: 1.1
Keywords: css opacity Cc:
Blocked by: Blocking:


Setting opacity in jQuery 1.1 fails with the following error:

Error in parsing value for property 'opacity'. Declaration dropped.

Here's the code:

    filter: 'alpha(opacity=60)',
    '-moz-opacity': 0.6,
    opacity: 0.6

This code worked in jQuery 1.0.3.

Change History (3)

comment:1 Changed 16 years ago by [email protected]

I forgot to mention, I'm on Firefox

Also, in the meantime, I'm using the following workaround:

    filter: 'alpha(opacity=60)',
    '-moz-opacity': 0.6
})[0].style.opacity = 0.6;

This is not the preferrable method for obvious reasons. :-)

comment:2 Changed 16 years ago by [email protected]

Interesting, this also worked:

    filter: 'alpha(opacity=60)',
    '-moz-opacity': '0.6',
    opacity: '0.6'

Note: the values 0.6 are strings ("0.6") instead of floats (0.6). That's annoying ...

comment:3 Changed 16 years ago by john

Milestone: 1.1
Resolution: fixed
Status: newclosed

Fixed in SVN, we were accidentally appending a 'px' to the opacity number.

Note: See TracTickets for help on using tickets.