user198729
user198729

Reputation: 63636

How to replace an DOM element in place with jQuery?

Something like follows:

$target.replace('<div>test</div>')

Upvotes: 0

Views: 97

Answers (1)

Greg W
Greg W

Reputation: 5239

$(target).replaceWith('<div>test</div>'); 

Upvotes: 5

Related Questions