What guarantee you have that the image will be loaded in the next
100ms?

The real fix is simple:

$('<img/>').bind('load readystatechange', function(){
  if (this.complete)
     alert('loaded');
}).attr('src',...).appendTo('body');


On Feb 8, 10:28 am, Jomange <[email protected]> wrote:
> try this
> $(function(){
>      window.setTimeout(
>          function mi(){
>              $('<img>').load(function()
>  { alert ('Not called in IE 6')   }).attr('src',src).appendTo('body');
>          }
>          ,100
>      );
>   })
> Worked for me
> On Jan 19, 7:23 pm, grigori <[email protected]> wrote:
>
> > Sample:
>
> > <html><head>
> > <script src="js/jquery-1.3.min.js"></script>
> > <script>
> > var src="http://www.google.com/intl/en_com/images/logo_plain.png";;
>
> > $(function(){
> >     window.setTimeout(
> >         function mi(){
> >             $('<img>').attr('src',src).appendTo('body').load(function()
> > { alert ('Not called in IE 6')   });
> >         }
> >         ,100
> >     );
>
> > })
>
> > </script>
> > </head><body></body></html>
>
> > Works in IE7, FireFox, but not in IE 6.
> > Is it expectable?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to