ok j'essaie de charger le .content de mon site avec jQuery, quand je le lance locale, il montre smoth et agréable mais quand je le tester sur un hôte serveur, l'animation est trop lent une des coupes ... et la « barre de chargement » ne se présente pas ...: SjQuery LoadPage - animation couper
voici mon code et si u besoin de quelque chose autre s'il vous plaît me demander
$(document).ready(function() {
var hash = window.location.hash.substr(1);
var href = $('.kwicksC li a , .footerContainer li a').each(function() {
var href = $(this).attr('href');
if (hash == href.substr(0, href.length - 4)) {
var toLoad = hash + '.php .content';
$('.content').load(toLoad)
}
});
$('.kwicksC li a , .footerContainer li a').click(function() {
var toLoad = $(this).attr('href') + '.content';
$('.content').fadeOut('fast', loadContent);
$('#load').remove();
$('#mainHWrap').append('<span id="load">CARGANDO...</span>');
$('#load').fadeIn('normal');
window.location.hash = $(this).attr('href').substr(0, $(this).attr('href').length - 4);
function loadContent() {
$('.content').load(toLoad, '', showNewContent())
}
function showNewContent() {
$('.content').fadeIn("slow", hideLoader());
}
function hideLoader() {
$('#load').fadeOut('normal');
}
return false;
});
});
Merci pour votre aide
C'est assez lisse pour moi. Mais là encore mon PC est une bête. – Marko