I see people creating HTML elements in jQuery in two different ways:
$('<element>')
and
$('<element />')
I am curious which one is “more correct”. I see the obvious advantage to the first one as being just simply less to type. Does it make a difference at all which one is used?
There is no difference, as seen in the source code, line 30 & line 121:
The following are equivalent:
<a></a><a /><a>