Here is a simple function that creates a random color.
function randomColor() { $letters = '0123456789ABCDEF'.split(''); $color = '#'; for (var i = 0; i < 6; i++ ) { $color += $letters[Math.floor(Math.random() * 16)]; } } $('a').hover(function() { randomColor(); $(this).css('color', $color); });
After adding this code every link on your site will randomly change color after you hover it.
Thank you.