To create an element node:
There are several ways that you can get in touch later. It is common to give the structure of this node directly to the HTML tag string, which is handled by the $ () function, $ ("HTML structure")
$ ("<div></div>")
Create as this node:
Similar to creating element nodes, you can directly describe the contents of the text
$ ("<div> I am a text node </div>")
Create as Attribute node:
The same way you create an element node
$ ("<div id= ' test ' class= ' Aaron ' > I am a text node </div>")
We've transformed the previous code through jquery, as shown in the code on the right.
It's all done in one sentence, the same way you write HTML structure.
$ ("<div class= ' right ' ><div class= ' Aaron ' > dynamically create DIV element nodes </div></div>")
This is how jquery creates nodes, and lets us preserve the way HTML is structured, very simple, convenient and flexible
jquery node creation and processing of attributes create node