Deep option object problem

Deep option object problem

When I create a widget that has deep set object literal options, and if I try to apply the widget to multiple divs, each div contains its values and the values of all the preceding instance's values as well.

e.g.
  1. $widget("test.me", {
  2.       options: {
  3.             subOption: {
  4.                   values: []
  5.             }
  6.       },
  7.       _create: function() {
  8.             var _this = this;
  9.             $.each(this.options.subOption.values, function (i, value) {
  10.                   alert(value);
  11.             }
  12.       }
  13. });
when this is put on multiple elements with different values I am getting non-instance specific concat'd version of this option array.



The fastest code is never executed.