Why do I get Uncaught SyntaxError: Unexpected identifier if it works once?
There are tons of them on StackOverflow . A punch list is usually a typo somewhere in a script.
It works once, then it gives 1 error message per second.
Here I change the colors of the states on the map:
<script type="text/javascript"> colors = [ 'rgba(255,0,0,0.1)','rgba(0,255,0,0.1)','rgba(0,0,255,0.1)' ]; $(document).ready(function(){ setInterval( $("ul").children().eq( Math.floor(50*Math.random())).css('color', colors[Math.floor(3*Math.random())] ) ,1000); }); </script>
john mangual
source share