J'ai récemment fait un petit fragment jQuery qui me permet de montrer un chargement img jusqu'à ce que l'image réelle est chargée.Jquery img préchargement ne fonctionne pas dans FireFox
L'extrait semble fonctionner dans Safari, Chrome mais pas dans FireFox. FireFox affiche uniquement un loading
alt et ne bascule jamais vers l'image chargée.
Voici l'extrait
var loading = $('<img src="/media/ajax-loader.gif" alt="loading" />');
$('.thumbnail').each(function(){
var loadIMG = loading.clone();
$(this).after(loadIMG).load(function(){
$(this).fadeIn('fast');
loadIMG.hide();
}).hide();
});
Toutes les idées pourquoi?
Êtes-vous emballer dans une méthode prête? – RobertPitt
Je suis oui, $ (document) .ready (function() {...}); – ApPeL