Ricardo,

Thanks so much for responding. That's very helpful. My use of events has been very rudimentary so far; your .bind() example has helped me understand them more fully. And now that I know what I'm looking for, various approaches to the problem have been illuminating as well.

for example ajp's recent thread::
http://osdir.com/ml/jquery-dev/2009-02/msg00615.html

On Sat, 14 Mar 2009, ricardobeat wrote:


Try this:

el.find("#pic")
   .attr({"src": pix[imgName].imgSrc, "name": imgName})
   .bind('load readystatechange', function(e){
      if (this.complete || (this.readyState == 'complete' && e.type =
'readystatechange')) {
           el.fadeIn("slow");
          $("#loading").hide();
      };
   });

The onload event for images is a cross-browser mess.

- ricardo

Reply via email to