Skip to main content

Bug Tracker

Side navigation

#14235 closed bug (notabug)

Opened August 08, 2013 09:10PM UTC

Closed August 08, 2013 09:14PM UTC

Last modified August 08, 2013 09:20PM UTC

Jquery collections model is different in firefox and chrome

Reported by: je34429@gmail.com 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

Attachments (0)
Change History (2)

Changed August 08, 2013 09:14PM UTC by dmethvin comment:1

resolution: → notabug
status: newclosed

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

Changed August 08, 2013 09:20PM UTC by anonymous comment:2

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/