Well-formed markup unneeded for single tags
Reported by: |
SidneySM |
Owned by: |
|
Priority:
|
major
|
Milestone:
|
|
Component:
|
docs
|
Version:
|
|
Keywords:
|
|
Cc:
|
|
Blocked by:
|
|
Blocking:
|
|
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?
Change History (3)
Resolution: |
→ fixed
|
Status: |
new →
closed
|
Blocking: |
4705 removed
|
Version: |
1.4
|
I've tried to clarify it a bit, if you think it still needs work add a comment on the docs page and we'll get to it.