Ticket #5807 (closed bug: fixed)
Well-formed markup unneeded for single tags
|Reported by:||SidneySM||Owned by:|
The documentation at < http://api.jquery.com/jQuery/#jQuery2> goes into great detail describing that well-formed snippets must be passed to jQuery(), even in the case of single tags.
This appears to go against what most users do, and against jQuery itself (since input's just parsed by a regexp, there's no difference between $('<div>'), $('<div/>'), and $('<div></div>')).
To avoid making the next generation of jQuery users think about elements in terms of opening and closing tags (which is training to see the document as markup rather than a DOM), could the documentation be amended to clarify that this only matters when the snippet contains nested tags?