Added deep clone method.
This commit is contained in:
parent
99872b7a63
commit
0f1eb5dd55
1 changed files with 7 additions and 0 deletions
|
@ -66,6 +66,13 @@ function difference(object1, object2) {
|
||||||
return changes;
|
return changes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clone(object) {
|
||||||
|
if (!object) {
|
||||||
|
return object
|
||||||
|
}
|
||||||
|
return JSON.parse(JSON.stringify(object));
|
||||||
|
}
|
||||||
|
|
||||||
jQuery.event.special.remove = {
|
jQuery.event.special.remove = {
|
||||||
remove: function(e) {
|
remove: function(e) {
|
||||||
if (e.handler) e.handler();
|
if (e.handler) e.handler();
|
||||||
|
|
Loading…
Reference in a new issue