dom-node-transfer
v1.0.0
Published
transfers one dom node into another, then deletes the duplicated dom node, then calls a callback.
Downloads
3
Readme
dom-node-transfer
transfer one dom node into another, then delete the duplicated dom node, the call a callback.
npm install dom-node-transfer -S
Usage
var domNodeTransfer = require('dom-node-transfer')
var dup = document.getElementById('dup')
var target = document.getElementById('target')
domNodeTransfer(dup, target, function () {
console.log('done!')
})
/* before
<div id='dup'>wow</div>
<div id='target'></div>
*/
/* after
<div id='target'>
<div id='dup'>wow</div>
</div>
*/