3200creative
9/29/2013 - 2:55 PM

jQuery script to change hyperlinks site wide to one of a random array of colors.

jQuery script to change hyperlinks site wide to one of a random array of colors.

jQuery(document).ready(function ($) {
 $('a' ).each(function() {
     var col = Array("#68be61","#ee3658","#ef4136","#f7931e","#2eabe2","#5a5faa"), pkr;
     pkr = Math.floor(Math.random() * col.length);
    $(this).css('color', col[pkr]);
    });
});