Response title
This is preview!
When I changed the value of the duplicate object of which the attribute is array type, then the original object will be contaminated. I thought if there are some bugs in method $.widget.extend().
I give an example as following:
$.widget("x.grid", {
options: {
columns:[]
……
},
_create: function(){
this.options.columns[0] = {……}; // ?
this.options.columns[1] = {……};
this.options.columns[2] = {……};
this.options.columns[3] = {……};
}
after doing this above, the original options.columns will be contaminated.
© 2013 jQuery Foundation
Sponsored by and others.