Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jakeburden/dom-node-transfer
https://github.com/jakeburden/dom-node-transfer
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jakeburden/dom-node-transfer
- Owner: jakeburden
- Created: 2016-01-07T03:29:15.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-07T03:34:13.000Z (about 9 years ago)
- Last Synced: 2024-12-12T09:15:47.732Z (about 1 month 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
[![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/)