$(target).method(content) $(content).method(target)
append() 元素末尾追加 appendTo()
prepend() 元素起始处插入 prependTo()
after() 元素之后 insertAfter()
before() 元素之前 insertBefore()
replaceWith() 替换 replaceAll()
wrap() 包装每一个选中的元素 wrapInner()
.clone() :Create a deep copy of the set of matched elements.
.wrapAll() : Wrap an HTML structure around all elements in the set of matched elements.
.empty() : 删除选中元素的子节点包括文本节点,但不会影响自身。
.remove() : 从文档中移除选中元素以及元素的所有内容
.detach() : The .detach()
method is the same as .remove()
, except that .detach()
keeps all jQuery data and events associated with the removed elements.
.unwrap() : Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place. This is effectively the inverse of the .wrap()
method.