Skip to main content

Bug Tracker

Side navigation

#839 closed bug (fixed)

Opened January 17, 2007 06:33PM UTC

Closed January 20, 2007 04:08AM UTC

Last modified June 19, 2007 09:24AM UTC

Setting opacity fails in jQuery 1.1

Reported by: 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.

Attachments (0)
Change History (3)

Changed January 17, 2007 06:39PM UTC by dossy@panopt comment:1

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. :-)

Changed January 17, 2007 10:15PM UTC by dossy@panopt comment:2

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 ...

Changed January 20, 2007 04:08AM UTC by john comment:3

milestone: → 1.1
resolution: → fixed
status: newclosed

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