I see people creating HTML elements in jQuery in two different ways:
$(\'\')
and
$(\' \')
<
There is no difference, as seen in the source code, line 30 & line 121:
/* Line 30*/
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
/* Line 121 */
// If a single string is passed in and it's a single tag
// just do a createElement and skip the rest
ret = rsingleTag.exec( selector );
The following are equivalent: