1

I have been using the following code to change an img src.

$('#wrapperHeaderImage img').attr("src", '<?php bloginfo( 'template_url' ); ?>/images/char2.png');

However when the src is changed it will reload the image each time.

I then tried to preload the image by using a css trick on an already existing div then waiting for the page to completely load.

#something { background: url('imgUrl') no-repeat -9999px -9999px; }

However it just reloaded the image when I changed the src to the same url as in the css.

The images are being faded in and out, I am not sure if that changes anything.

Thanks.

Rambomst
  • 653
  • 2
  • 10
  • 28

0 Answers0