[jQuery] Re: Using replaceWith on a div / instead of a div/div causes text to be deleted

2009-07-28 Thread Eric Garside
The W3C has a list of valid self-closing tags, div of which is not one of them (for the sake of compatibility, I think). http://www.w3schools.com/xhtml/xhtml_ref_byfunc.asp Only the following tags should be self closed: area / base / basefont / br / hr / input / img / link / meta / On Jul 28,

[jQuery] Re: Using replaceWith on a div / instead of a div/div causes text to be deleted

2009-07-28 Thread Ricardo
I think you're confused because jQuery accepts self-closing syntax for element creation, this will probably work: xx.replaceWith( $('div /') ); On Jul 28, 12:30 pm, thorasm...@gmail.com thorasm...@gmail.com wrote: Not sure whether this is a bug, but is is certainly unexpected behaviour.