[Request] Functionality to duplicate DOM node
See original GitHub issueI’d love a parameter like “duplicateNode: true
”
That would make it so the dom node is duplicated on the spot and the animation is only done on the duplication.
Great to make items fly into a cart but keep the original dom item in place!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Node.cloneNode() - Web APIs - MDN Web Docs
To clone a node to insert into a different document, use Document.importNode() instead. Syntax. cloneNode() cloneNode(deep)
Read more >HTML DOM Element cloneNode Method - W3Schools
Definition and Usage. The cloneNode() method creates a copy of a node, and returns the clone. The cloneNode() method clones all attributes and...
Read more >How to copy a DOM node with event listeners? - Stack Overflow
Use a wrapper function around Node.addEventListener() to keep track of listeners added to each node. This is how jQuery's clone() method is able ......
Read more >CloneNode() method in JavaScript? - Tutorialspoint
Example 1 · First, use the querySelector() function to choose the ul with the id menu. · Second, use the cloneNode() method to...
Read more >How to copy or clone an element with vanilla JS
You call the cloneNode() method on the element you want to copy. If you want to also copy elements nested inside it, pass...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mesqueeb You can do it yourself though, can’t you? I’m currently doing this as well where I need to
Something like
This is more JS related than anime.js related, and way too specific to be added in to the doc. Thanks @everdimension for the solution !