#839 closed bug (fixed)
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: |
Description
Setting opacity in jQuery 1.1 fails with the following error:
Error in parsing value for property 'opacity'. Declaration dropped.
Here's the code:
$('#element').css({ 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
comment:2 Changed 16 years ago by
Interesting, this also worked:
$('#element').css({ 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
Milestone: | → 1.1 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed in SVN, we were accidentally appending a 'px' to the opacity number.
Note: See
TracTickets for help on using
tickets.
I forgot to mention, I'm on Firefox 1.5.0.9.
Also, in the meantime, I'm using the following workaround:
This is not the preferrable method for obvious reasons. :-)