replace
2.0.4Replaces one element with some content while keeping [can.view.live.nodeLists nodeLists] data correct.
live.replace(nodes, val, teardown) 2.0.4
Replaces one element with some content while keeping [can.view.live.nodeLists nodeLists] data correct.
Parameters
-
nodes
{Array<HTMLElement>}An array of elements. There should typically be one element.
-
val
{String | HTMLElement | DocumentFragment}The content that should replace
nodes. If a string is passed, it will be hookedup. -
teardown
{function()}OptionalA callback if these elements are torn down.