Opened 13 years ago
Closed 12 years ago
#8403 closed bug (fixed)
jQuery Bulldozes Other IE Filters When Assigning Opacity
Reported by: | 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:
- Use
elem.currentStyle['filter']
to see the full filter list - If the Alpha filter isn't already applied, add to the filter list (space- or comma-delimited)
- If it does exist previously, modify via
elem.filters["DXImageTransform.Microsoft.Alpha"].opacity = Number_between_0_and_100
Change History (4)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Here is a pull request, also fixing #8401 https://github.com/jquery/jquery/pull/256
comment:3 Changed 13 years ago by
Component: | unfiled → css |
---|---|
Priority: | undecided → high |
Status: | new → open |
Can you add some unit tests for this?
comment:4 Changed 12 years ago by
Milestone: | 1.next → 1.6 |
---|---|
Resolution: | → fixed |
Status: | open → closed |
Landed.
Note: See
TracTickets for help on using
tickets.
Fiddle: http://jsfiddle.net/brianblakely/22Nac/16/