I tested some code in IE7 today and ran into a strange problem with the
jQuery .wrap method.  I have narrowed it down to this function failing when
targeting a frame like this:

 

curContext = $('#mPreviewFrame')[0].contentWindow.document;

$('#mydiv',curContext).wrap('<div id="myNewOuterDiv"></div>');

 

This generates an error "Invalid Argument" in IE 7, but works fine in FF. To
further isolate the problem I changed the 'curContext' to a div on the
current page and tested, and that works fine in IE, so it appears to be
specifically releated to using a frame as the context.

 

Does anyone know another way this could be written to achieve the same
result? Is this a bug?

 

Thanks!!

 

BrookD 

Reply via email to