Edit this page

up.element up.element.replace(oldElement, newElement)
JavaScript function

This feature has been deprecated. Use Element#replaceWith() instead.

Load unpoly-migrate.js to polyfill deprecated features.

Replaces the given old element with the given new element.

The old element will be removed from the DOM tree.


Parameters

oldElement Element
newElement Element