I have some strange things when trying to replicate the properties of the archived object using the jQuery data function.
This is one thing (for example):
wrapper.data ('infos', {label: $ ('input [name * =' label " ] '). Val (), Amount: $ (' Input [name * = '' sum ']'). Val (), etc.}} Then I use these By trying to read the values:
$ each. (Wrapper.data ('infos'), function (k, v) {console .log (k +' & gt; + V);}); And I get a pretty output like:
0> Undefined 1> Undefined ... 23 9> If I output this object, then I have to go without any difficulty. Is it somehow related to jquery caching or something?
Because your objects In length property, it is defined as an array, at least 1.7.2, whether or not it is an array, through it: length = obj.length, isObj = length === undefined || JQuery.is function (obje); then you should either
< Li> Make your length call something else var data = wrapper.data ('infos') (var x in data) {if (data.hasOwnProperty (x) for loop -
instead of > ) {// prototype chain console Leave property from log (X + '' gt; '+ data [x]); }}
Comments
Post a Comment