Small correction: it should be bind('readystatechange'.. as jQuery
adds the 'on' prefix by itself.
cheers,
- ricardo
On Jan 22, 3:25 am, LoicDuros wrote:
> Thanks everyone for your help. many different ways of doing it... I'll
> try each of them until something works! THanks!
>
> On Jan 21, 11:
Thanks everyone for your help. many different ways of doing it... I'll
try each of them until something works! THanks!
On Jan 21, 11:35 pm, Ricardo Tomasi wrote:
> A cross-browser way of doing that:
>
> $('img').fadeOut(500, function(){
> $(this).attr('src',newsrc).bind('onreadystatechange loa
A cross-browser way of doing that:
$('img').fadeOut(500, function(){
$(this).attr('src',newsrc).bind('onreadystatechange load', function()
{
if (this.complete) $(this).fadeIn(1000);
});
});
http://jsbin.com/uriku
http://jsbin.com/uriku/edit
On Jan 21, 7:30 pm, Balazs Endresz wrote:
>
Also, see this discussion about using the load event with images:
http://groups.google.com/group/jquery-dev/browse_thread/thread/24b107e84adeaaee
On Jan 21, 8:55 pm, Bohdan Ganicky wrote:
> Fixed braces:
>
> $('#image').fadeOut(500, function() {
> $(this).attr('src','images/'+newImg).load(func
Fixed braces:
$('#image').fadeOut(500, function() {
$(this).attr('src','images/'+newImg).load(function() {
$(this).fadeIn(1000);
});
});
--
Bohdan
On Jan 21, 8:54 pm, Bohdan Ganicky wrote:
> In theory it would be something like this:
>
> $('#image').fadeOut(500, function() {
> $(this
In theory it would be something like this:
$('#image').fadeOut(500, function() {
$(this).attr('src','images/'+newImg).load(function() {
$(this).fadeIn(1000);
});
}
...but I'm not at all sure if the "load()" captures the "src"
attribute change like that.
--
Bohdan
On Jan 21, 7:54 pm, Lo
6 matches
Mail list logo