Bug Tracker

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#14235 closed bug (notabug)

Jquery collections model is different in firefox and chrome

Reported by: je34429@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:

Description

i found an issue working with arrays of objects made by jquery, ill post the code so u can see it by your self:

i want to compare 2 arrays of objects so when one object inside the first array gets clicked it will trigger an animation on another object inside the second array, both arrays have the same index length, but the problem comes when i want to compare objects inside both arrays using their id or class as a node inside the object's atributes:

for example i make this collection: var botones = $('.boton'); where i get lets say 4 buttons

and then i make another array with same quantity of objects var caja =$('.caja'); where i get lets say 4 divs

then ill look into the model built by jquery this way: botones[0].attributes[0].nodeValue

in firefox i get the id first and then the class, but in chrome i get the class first and then the id so:

firefox model: botones[0].attributes[0].nodeValue ---> id botones[0].attributes[1].nodeValue ---> class

chrome model: botones[0].attributes[0].nodeValue ---> class botones[0].attributes[1].nodeValue ---> id

would be nice if u guys could unify this so u dont have to write for each browser.

Best Regards Jaime Rodríguez Graphic Designer

Change History (2)

comment:1 Changed 6 years ago by dmethvin

Resolution: notabug
Status: newclosed

Sry but if u cud do it urself or not depend on that stuff, it wud be gr8.

comment:2 Changed 6 years ago by anonymous

sry about pasting the code, here is a fidle with my exercise, as u can see it works on firefox but not in chrome.

http://jsfiddle.net/je34429/exYja/

Note: See TracTickets for help on using tickets.