Re: [jQuery] How do I add a js array of jquery objects to a jqueryobject?

2006-11-13 Thread Dave Methvin
I was surprised seeing that array copying is done as b = merge( a, [] ) in place of b = a.concat();: shouldn't the latter be faster? The problem with .concat() is that a is not always an array. It is often a NodeList returned from getElementsByTagName() or childNodes. You might think that

Re: [jQuery] How do I add a js array of jquery objects to a jqueryobject?

2006-11-12 Thread Dave Methvin
I've got a jquery script where I append (one by one) 50 new jquery objects to another jquery object, but it's taking way too much time, so I thought that it could be faster if I make an array buffer out of them and then aggregate the array as a whole, but I don't find out how to do it. Can

Re: [jQuery] How do I add a js array of jquery objects to a jqueryobject?

2006-11-12 Thread Andrea Ercolino
I have got an array of 50 urls templates, and want to make a proper url out of each one, adding also a special click, and then append all these urls to a div in a specific position. All this should be done many times in a page, many could be 50, just to say something that could be possible, but

Re: [jQuery] How do I add a js array of jquery objects to a jqueryobject?

2006-11-12 Thread Andrea Ercolino
I just put a time start / end probes and found that each 50 times append loop eats up almost 500 milliseconds. Between 465 and 515 on IE7 and between 500 and 575 on FF1.5.0.8 This means that a page with 10 loops, needs 5 seconds to end displaying!! AND I was wrong before, each link is inside 2

Re: [jQuery] How do I add a js array of jquery objects to a jqueryobject?

2006-11-12 Thread Michael Geary
From: Andrea Ercolino I have got an array of 50 urls templates, and want to make a proper url out of each one, adding also a special click, and then append all these urls to a div in a specific position. All this should be done many times in a page, many could be 50, just to say

Re: [jQuery] How do I add a js array of jquery objects to a jqueryobject?

2006-11-12 Thread Andrea Ercolino
mea culpa I made a 'mistake': I put in the loop an accessor $( .class ) that caused the abnormal delay. After saving the reference $class = $( .class ) before entering the loop, the delay has lowered to 78 milliseconds in IE7 AND 78 milliseconds in FF1.5.0.8: unbelievable! you can save

Re: [jQuery] How do I add a js array of jquery objects to a jqueryobject?

2006-11-12 Thread Klaus Hartl
Andrea Ercolino schrieb: mea culpa I made a 'mistake': I put in the loop an accessor $( .class ) that caused the abnormal delay. After saving the reference $class = $( .class ) before entering the loop, the delay has lowered to 78 milliseconds in IE7 AND 78 milliseconds in FF1.5.0.8: