When you create an element, add expandos to it, then use wrap, the expandos that have been added are removed. This happens with all the browsers I have tried it on.
var wrapper = document.createElement("div");
wrapper.sometext = "Some text";
wrapper.clickcss = {border: "2px solid #eee", padding: "6px"};
$("#foo").wrap(wrapper).click(
function(e)
{
e.preventDefault();
alert(this.parentNode.sometext);
$(this.parentNode).css(this.parentNode.clickcss);
}
);
Example
The CSS is set in Internet Explorer when jQuery 1.1.2 (the default on the example page) is used, but not when 1.2.1 is used.
The alert is 'undefined' in Firefox 2, but shows the correct text in Internet Explorer 6 and 7.
So:
Firefox: both expandos are removed
Internet Explorer: object expando (clickcss) removed, text expando still present