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
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
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
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(){
>
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="<
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=
+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ê
--~--~-~--~-
> 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
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?
>
> 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
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
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
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.
--~--~-~--~~~---~--
> 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
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
15 matches
Mail list logo