Actualmente estoy trabajando en un proyecto y quiero cambiar el color SVG con intervalo de tiempo...
var bulbColors = [ '#FFFFFF', '#27ae60', '#16a085', '#f39c12', '#e74c3c', '#9b59b6', '#FB6964', '#342224', '#472E32', '#BDBB99', '#77B1A9', '#2c3e50' ]; $(function (){ var i = 0 $('svg').find('path', this).attr('fill', 'bulbColors[i]') setInterval(function(){ i++; if (i == bulbColors.length){ i = 0; } $(this).fadeOut('slow', function () { $('svg').find('path', this).attr('fill', 'bulbColors[i]') $(this).fadeIn("slow"); }) }, 6000); })Intenta cambiar este código
$('svg').find('path', this).attr('fill', 'bulbColors[i]')Debe quitar las comillas bulbColors[i], de lo contrario, javascript lee el argumento como una cadena, y no el color hexadecimal en la lista en el índice [i].