On 8/28/12 10:52 AM, Trevor Parscal wrote:
jQuery internally maps '<tagName>' to document.createElement( 'tagName' ).
This is a feature, and is used throughout jQuery internally. It's not very
well documented as such, but Timo is adding it to the documentation as to
resolve the confusion around this. $( '<div>' ) is a shortcut added to
jQuery for our convenience, and I think it's reasonable to use it.

In that case, perhaps we should just say that all of the options are fine:
$( '<div>' )
$( '<div/>' )
$( '<div></div>' )
but emphasize not to use attributes in the tag creation.

Ryan Kaldari

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to