Last active
December 21, 2015 02:09
-
-
Save marcosfreitas/6232931 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//script para mudar status das logos | |
function transitor(){ | |
var time = 200; | |
jQuery('#bloco-clientes #clientes div').each(function(){ | |
console.log('time', time); | |
var idCli = this.id; console.log('cli id', idCli); | |
console.info('id: ',idCli); | |
// 7 segundos pra mudar de banner | |
if(idCli != ''){ | |
// setTimeout(function(){ | |
jQuery(this).delay(time); | |
jQuery(this).removeClass('img-cli'); | |
jQuery(this).addClass('caps-img-cli'); | |
jQuery(this).addClass('radius4px'); | |
jQuery(this).children('img').attr('src', '_img/_banners-clientes/color-'+idCli+'.png'); | |
console.log('src ','_img/_banners-clientes/color-'+idCli+'.png'); | |
//esperando para mudar a imagem novamente para preto e branco | |
jQuery(this).delay(3000); | |
// setTimeout(function(){ | |
jQuery(this).children('img').attr('src', '_img/_banners-clientes/'+idCli+'.png'); | |
jQuery(this).addClass('img-cli'); | |
jQuery(this).removeClass('caps-img-cli'); | |
jQuery(this).removeClass('radius4px'); | |
//}, 3000); | |
// }, time); | |
time = 4000; | |
} | |
}); | |
transitor(); | |
}; | |
jQuery(window).load(function(){ | |
transitor(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment