https://github.com/jakeburden/dom-node-transfer
https://github.com/jakeburden/dom-node-transfer
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jakeburden/dom-node-transfer
- Owner: jakeburden
- Created: 2016-01-07T03:29:15.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-07T03:34:13.000Z (over 9 years ago)
- Last Synced: 2025-01-08T13:53:43.165Z (6 months ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.markdown
Awesome Lists containing this project
README
## dom-node-transfer
[](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/)