Side navigation
#8403 closed bug (fixed)
Opened February 28, 2011 06:19PM UTC
Closed April 12, 2011 04:36AM UTC
jQuery Bulldozes Other IE Filters When Assigning Opacity
Reported by: | anewpage.media@gmail.com | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 1.6 |
Component: | css | Version: | 1.5.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Steps to Reproduce:
Assign a background gradient to an element in your external CSS, like so:
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffff0000', EndColorStr='#ffffffff');
On the same element, set a moderate opacity:
$(elem).css('opacity', '0.5');
Your gradient will disappear.
Steps to Fix:
1. Use
elem.currentStyle['filter']to see the full filter list
2. If the Alpha filter isn't already applied, add to the filter list (space- or comma-delimited)
3. If it does exist previously, modify via
elem.filters["DXImageTransform.Microsoft.Alpha"].opacity = Number_between_0_and_100
Attachments (0)
Change History (4)
Changed February 28, 2011 06:24PM UTC by comment:1
Changed March 07, 2011 01:11AM UTC by comment:3
component: | unfiled → css |
---|---|
priority: | undecided → high |
status: | new → open |
Can you add some unit tests for this?
Changed April 12, 2011 04:36AM UTC by comment:4
milestone: | 1.next → 1.6 |
---|---|
resolution: | → fixed |
status: | open → closed |
Landed.
Fiddle:
http://jsfiddle.net/brianblakely/22Nac/16/