In addition to creating and inserting content, the ability to alter the current content of a page is a key scenario in web development. JQuery has functions that can do that shit there.
wrap()
: wrap the matched elements with the specified contentwrapAll()
: wrap content around the matched elements as a groupunWrap()
: remove the parents from the matched elementsempty()
: remove all the child elements from the matched elementremove()
: removes elements from the page, including any embedded data and event handlersdetach()
: removes elements from the page but keeps the embedded data and event handlersreplaceAll()
: replaces the matched elements with the specified contentreplaceWith()
: replaces matched elements with content or results from a callback functionThis is paragraph 1.
This is paragraph 2.
This is paragraph 3.
This is paragraph 4.
This is paragraph 5.