Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jakeburden/dom-node-transfer


https://github.com/jakeburden/dom-node-transfer

Last synced: 17 days ago
JSON representation

Awesome Lists containing this project

README

        

## dom-node-transfer

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

transfer one dom node into another, then delete the duplicated dom node, then call a callback.

```npm install dom-node-transfer -S```

### Usage

```js
var domNodeTransfer = require('dom-node-transfer')

var dup = document.getElementById('dup')
var target = document.getElementById('target')

domNodeTransfer(dup, target, function () {
console.log('done!')
})

/* before

wow


*/

/* after


wow


*/
```

[jsfiddle](https://jsfiddle.net/jekrb/g8w8p9u9/)