jQuery .load() not firing on images (probably caching?)

I have some pretty basic jQuery code:

...
$(this).find('img').load(function(){
   loadedImages++;
   if(loadedImages == $this.find('img').length){
...

However, thats not firing consistently. It fires if i do a hard refresh or close my browser, but a normal refresh, or just hitting the same URL twice at any time without erasing the cache makes the .load() never fire.

Any ideas on how to fix this?

15
задан Oscar Godson 11 April 2011 в 16:54
поделиться