https://github.com/rupurt/ember-safe-clone
A jquery plugin to safely clone an ember view
https://github.com/rupurt/ember-safe-clone
Last synced: 12 months ago
JSON representation
A jquery plugin to safely clone an ember view
- Host: GitHub
- URL: https://github.com/rupurt/ember-safe-clone
- Owner: rupurt
- Created: 2012-05-11T01:21:27.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2012-06-24T18:08:06.000Z (about 14 years ago)
- Last Synced: 2025-03-30T04:41:35.814Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 133 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Ember Safe Clone: A jQuery plugin to clone ember views
======================================================
EmberSafeClone is a plugin that allows the dom strucuture of an ember view to be safely cloned.
It works by removing all traces of ember id's, classes and metamorph script tags in the view node
and it's subtree.
This plugin was inspired by the [coffeescript solution](http://codebrief.com/2012/03/eight-ember-dot-js-gotchas-with-workarounds/) posted by Gordon Hempton
Usage
-----
First load jQuery and the plugin
```
```
Now when you need to clone your view
```
var view = Ember.View.create();
var clone = view.$().cloneEmber();
```
Author
------
[Alex Kwiatkowski](https://github.com/rupurt) ([@rupurt](https://twitter.com/#!/rupurt))
License
-------
[MIT License](http://www.opensource.org/licenses/mit-license.php)