[jquery-dev] Re: .load callback for an image does not work in IE 6

2009-02-19 Thread Alessandro
Hi, i'm pretty new to jquery/javascript, and this bug is affecting my website... riccardo, can you please explain your solurion a litle more.. i'm not getting it. my code is: var imageObj = new Image(); $(imageObj).attr("src",imagePath).load(function() { //callback function here }); how shoud I

[jquery-dev] Re: .load callback for an image does not work in IE 6

2009-02-16 Thread Chris Zeh
Yeah, so I've been banging my head against the wall for multiple hours because my website in development working perfectly in Safari and Firefox and works like crap in IE (6 & 7). I finally narrowed the problem down to IE caching my images, and now this website helped me realize IE doesn't fire th

[jquery-dev] Re: .load callback for an image does not work in IE 6

2009-02-09 Thread Ricardo Tomasi
Correction: IE7 is a bit messy. On first load, the .complete property goes from 'false' to 'true' correctly and the load event is not fired. However, after the image is cached, .complete is always false, readyState is always == 'complete' and both readystatechange and load fire. I ended up writin

[jquery-dev] Re: .load callback for an image does not work in IE 6

2009-02-09 Thread Ricardo Tomasi
What guarantee you have that the image will be loaded in the next 100ms? The real fix is simple: $('').bind('load readystatechange', function(){ if (this.complete) alert('loaded'); }).attr('src',...).appendTo('body'); On Feb 8, 10:28 am, Jomange wrote: > try this > $(function(){ >    

[jquery-dev] Re: .load callback for an image does not work in IE 6

2009-02-08 Thread Jomange
try this $(function(){ window.setTimeout( function mi(){ $('').load(function() { alert ('Not called in IE 6') }).attr('src',src).appendTo('body'); } ,100 ); }) Worked for me On Jan 19, 7:23 pm, grigori wrote: > Sample: > > > > > var src="<

[jquery-dev] Re: .load callback for an image does not work in IE 6

2009-02-08 Thread Jomange
try this $(function(){ window.setTimeout( function mi(){ $('').load(function() { alert ('Not called in IE 6') }).attr('src',src).appendTo('body'); } ,100 ); }) it worked for me On Jan 19, 7:23 pm, grigori wrote: > Sample: > > > > > var src=

[jquery-dev] Re: .load callback for an image does not work in IE 6

2009-01-20 Thread Iraê
+1 - very useful one -- irae On 1/20/09, Már wrote: > >> If you wish, you could file an enhancement bug here and we could check >> in to it for a later release. > > Thanks. Here's the ticket: http://dev.jquery.com/ticket/3930 > > > -- > Már Örlygsson > > > -- []s, Iraê --~--~-~--~-

[jquery-dev] Re: .load callback for an image does not work in IE 6

2009-01-20 Thread Már
> If you wish, you could file an enhancement bug here and we could check > in to it for a later release. Thanks. Here's the ticket: http://dev.jquery.com/ticket/3930 -- Már Örlygsson --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

[jquery-dev] Re: .load callback for an image does not work in IE 6

2009-01-20 Thread John Resig
If you wish, you could file an enhancement bug here and we could check in to it for a later release. http://dev.jquery.com/newticket This sounds like a reasonable addition. --John On Tue, Jan 20, 2009 at 6:41 AM, Már wrote: > >> I though the key was attaching the load event before the src? >

[jquery-dev] Re: .load callback for an image does not work in IE 6

2009-01-20 Thread Már
> I though the key was attaching the load event before the src? It always seemed that jQuery should perform similar magic when "load" handlers ar bound to images, as it does for the "document.ready" - i.e. to trigger the handler if the image is already loaded. That seems like The jQuery Way to d

[jquery-dev] Re: .load callback for an image does not work in IE 6

2009-01-20 Thread redsquare
I though the key was attaching the load event before the src? On Tue, Jan 20, 2009 at 1:05 AM, weepy wrote: > > malsup's right. It's bitten me a few times. > > On 20 Jan, 00:18, malsup wrote: > > > Works in IE7, FireFox, but not in IE 6. > > > Is it expectable? > > > > Check the img.complete pr

[jquery-dev] Re: .load callback for an image does not work in IE 6

2009-01-20 Thread steve flitcroft
I though the key was attaching the load event before the src? On Tue, Jan 20, 2009 at 1:05 AM, weepy wrote: > > malsup's right. It's bitten me a few times. > > On 20 Jan, 00:18, malsup wrote: > > > Works in IE7, FireFox, but not in IE 6. > > > Is it expectable? > > > > Check the img.complete pr

[jquery-dev] Re: .load callback for an image does not work in IE 6

2009-01-19 Thread weepy
malsup's right. It's bitten me a few times. On 20 Jan, 00:18, malsup wrote: > > Works in IE7, FireFox, but not in IE 6. > > Is it expectable? > > Check the img.complete property.  IE won't fire the load event if the > image is retrieved from cache. --~--~-~--~~~---~--

[jquery-dev] Re: .load callback for an image does not work in IE 6

2009-01-19 Thread malsup
> Works in IE7, FireFox, but not in IE 6. > Is it expectable? Check the img.complete property. IE won't fire the load event if the image is retrieved from cache. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "jQu

[jquery-dev] Re: .load callback for an image does not work in IE 6

2009-01-19 Thread John Resig
What happens if you attach the load handler before you insert it into the document? --John On Mon, Jan 19, 2009 at 12:23 PM, grigori wrote: > > Sample: > > > > > var src="http://www.google.com/intl/en_com/im