>I'm trying to do that due to this issue: >http://groups.google.com/group/jquery- >en/browse_thread/thread/0a3630dc90b2c10b/1026fc07b5cd587f?#1026fc07b5cd587f > >If you have any other and better solution, I'm all hears :) > >You say the DOM element does not exist, but isn't that what clone is >supposed to do? I though I was cloning an element in the DOM and then >changing it's class...
No, it exists as an element stored in a variable--but not an actual item in the current DOM tree. It would be the same as doing: var el = document.createElement("a"); The above is an element, but it doesn't currently exist in the DOM until I programmatically place in the DOM: document.body.appendChild(el); My experience with IE is that certain aspects of an element can not be read until it actually is placed in the DOM tree. This is usually related to things that affect the visual state of the element (such as the color of the text.) I believe this is because IE doesn't fully process elements that aren't capable of being viewed. My guess is if you actually try adding the cloned item somewhere on the page (using the $("body").append()) you could probably then read the color. If that does work, then it sounds like my suspicion may be correct and that you might need to move the element to a DOM and then remove it when you're done with it. -Dan