diff --git a/entries/jQuery.xml b/entries/jQuery.xml index 921ca1a9..398f10b4 100644 --- a/entries/jQuery.xml +++ b/entries/jQuery.xml @@ -183,7 +183,7 @@ $( myForm.elements ).hide();
$( "<a href='https://jquery.com'></a>" );
Tags that cannot contain elements may be quick-closed or not:
-$( "<img>" );
+$( "<img />" );
$( "<input>" );
When passing HTML to jQuery()
, note that text nodes are not treated as DOM elements. With the exception of a few methods (such as .content()
), they are generally ignored or removed. E.g: