You can not load images with AJAX simply create a new image object and append, then the image can load asyncronously. Try this simple jQuery plugin:

$.fn.image = function(src, f){
    return this.each(function(){
        var i = new Image();
        i.src = "">        i.>        this.appendChild(i);

Then call this plugin like:
  alert("The image is loaded now");

2006/8/15, Braveheart <[EMAIL PROTECTED] >:

I stried to use ajax with jquery to load images. Basicly it works but I don't
get the image, instead I get some strange codes from the picture, I guess
because .jpg is a binary file.

Maybe this is a basic question, but still how can I load images with jquery
and is there any way to use that little animated .gif that shows that
somethink is loading with jquery?
View this message in context:
Sent from the JQuery forum at

jQuery mailing list

jQuery mailing list

Reply via email to