Ticket #5270 (closed bug: wontfix)
clone() doesn't clone filters in IE6
| Reported by: | olmokhov | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.4 |
| Component: | core | Version: | 1.3.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
I've got some elements with fixed png's by filters. Using clone() function destroys fixing, as it can be seen in IE Developer Bar.
I wrote code that makes this, but I'm not JavaScript guru and think that developers can do this job better:
$.fn.cloneWithFilters = function(){
var clone = $(this).clone(); if ($.browser.msie && $.browser.version < 7) {
var this_els = $(this).find('*'), i = 0; clone.find('*').each(function(){
if (this.nodeName !== this_els[i].nodeName)
return;
$(this).css('filter', $(this_els[i]).css('filter'));
i++;
})
} return clone;
}
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

I don't think that this is something that we're going to land in jQuery core, it's really up to you to copy those properties and styling over.