ColorPlugin – Script stopped working
Hello,
I have the script below running on my website to make text's color change after a given interval. It's kind of stupid, I tried to add something and clean it up, but now it stopped working and I can't find the error.
It's supposed to randomly choose from a set of colors (myColors) and apply it to the text's color of certain elements, defined by class or tag. All of this should be repeated in a given interval.
My skills don't seem to be sufficient for finding the error...
- <script type="text/javascript" src="http://52146187.de.strato-hosting.eu/Cargo/jquery.colorplugin.js"></script>
<script type="text/javascript" src="http://52146187.de.strato-hosting.eu/Cargo/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript">
var myColors = ["#000000", "#FF0000", "#0000FF", "#28c828"];
var getColor = function(){
var index = Math.floor(Math.random()*4);
var col = myColors[index];
$('body', 'a').animate({ color: col }, 3000);
$('.page_title', '.page_title a', '.project_content', '.project_content a', '.project_title', '.description', '.project_rail').animate({ color: col }, 3000);
}
$(document).ready(function(){
setInterval(getColor, 20000);
});
</script>
Thanks!