replace elements in jQuery

To replace dom elements in jQuery, API provides it’s own inbuilt function replaceWith() and replaceAll().

We can use them as follows:

// select > replace
// this will replace all h1 with div having "hello" inside.

// create > replace selection

any?’s. Please let me know.

Anoop kumar sharma

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>