That won't trigger a load event
This is as close as you'll get (using an image object to actually load
it, and then using it.
var imageObj = new Image();
$(imageObj).attr("src",imagePath).load(function(){
// do whatever else you want to do in here too
$("#leftCol").css("background-image","url("+imagePath+")");});
Liam
jscharf wrote:
2 possibilities:
via attribute:
$("#mytd").attr("background", "path/to/image.jpg");
or via CSS
$("#mytd").css("background-image", "path/to/image.jpg");
that should work fine for your needs (make sure the paths are correct)
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.733 / Virus Database: 271.1.1/2709 - Release Date: 02/25/10 07:34:00