For key methods to handle inserting nodes into elements:
.append()
.appendTo()
.prepend()
.prependTo()
.wrap() function to wrap the contents
.remove() to remove nodes from an element
Demo Example:
1. append() and prepend():
Output result:
2. appendTo() and prependTo():
Output result:
3. wrap():
Before vs. After
4. remove():
Output result:
沒有留言:
張貼留言