You are right, it has to do with setTimeout.  In IE, setTimeout does
not allow you to pass parameters like this, and in fact it is against
the spec to do so.

http://www.claws-and-paws.com/node/1252



On May 3, 12:34 am, Luke Bayes <lba...@patternpark.com> wrote:
> Hey Josh,
>
> Thanks so much for taking the time to go through this. You are
> absolutely right in that I didn't test my distilled example - Sorry
> about that!
>
> I dug a little deeper, and it seems my problem is somehow related to
> IE's handling of setTimeout. As I said, I'm working with Google Maps
> and of course that is incredibly slow with larger collections, so I
> threw the call into a setTimeout and let it happen over time.
>
> Following is a distilled example that illustrates the problem in a
> more accurate representation and actually reproduces properly:
>
> <div id="list">
>     <div class="foo">
>       <div class="bar">one</div>
>     </div>
>     <div class="foo">
>       <div class="bar">two</div>
>     </div>
>     <div class="foo">
>       <div class="bar">three</div>
>     </div>
>     <div class="foo">
>       <div class="bar">four</div>
>     </div>
> </div>
> <script>
> function render(item) {
>     text = $(item).find('.bar').text();
>     console.log('text: ' + text);
>
> }
>
> var text;
> var foos = $('#list > .foo');
> foos.each(function(index, foo) {
>     setTimeout(render, 1, foo);});
>
> </script>
>
> Thanks,
>
> Luke Bayes
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to