internet explorer 8 - How to properly clone (jQuery) an element that has style applied through PIE? -
I'm successfully using the I have found a JSFID to explain the problem, and the input is welcome (even other, similar approach PIE options) - However, Any help is appreciated. What could be the reason, is there any possible solution? Cheers, POL Two issues facing cloning elements of PII Come on: Therefore, to get the proper clone, we have to get rid of both. For the first time, setting the behavior style property of each PIE element can temporarily be 'None', after which cloning and can be restored. Setting it into 'None' runs PEE's cleanup methods that remove all VML elements. The second item should be done manually, because PIE does not automatically remove _pieId properties automatically. Both of these are easy enough for the script. There is a custom jQuery extension that handles it in my limited test: You will then call the CloneWithPIE method such that you will call the normal clone method: Hope that works for you. .htc version on a new project IE8 +) will be targeted, however, I'm having trouble trying to clone the element on which the PIE-style applies.
.htc Files can not be referenced cross-domain, so this Bella simply uses actual markup and CSS.
jQuery.fn.cloneWithPIE = function (DataAndEvents, DeepDataAndEvents) {// with PIE Attach elements and remove their behavior: var pied = this.find ('[_ pieId]'). CSS ('behavior', 'none'); // clone: var clone = this.clone (data entrents, deep data entries); // Remove _pieId from each original and cloned // elements, and restore behavior: pied.add (clone.find ('[_ pieId]')). RemoveAttr ('_ pieId'). CSS ('behavior' ''); Return clone; }
$ ('. SomeEl'). CloneWithPIE () .appendTo (newParent)
Comments
Post a Comment