Bug Tracker

Modify

Ticket #5270 (closed bug: wontfix)

Opened 4 years ago

Last modified 3 years ago

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

comment:1 Changed 3 years ago by john

  • Status changed from new to closed
  • Resolution set to wontfix
  • Milestone changed from 1.3.2 to 1.4

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.