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

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

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)