JQuery – Randomize Anything – Random Numbers with Random Colors

Some years ago, while I was writing my master thesis (I have two of them in two different languages), I remember that I was told that I should write something that is not written before and I should convince the reader why it is interesting. Now, I do not have to convince the reader anything, I simply code what I like and what I am currently learning. Thus, if you write “random jQuery” in google you would probably get about 3 pages of great ways to make ransoms in jQuery.

Anyway, I wanted to receive a way to make a random number in random font and background color. Thus, I have received the following result:random_numbers_random_colors

This article would be published on national holiday of Bulgaria, thus happy union day! Especially for the national holiday I have played with the random to achieve a result like this:


The question is how? 🙂 With jQuery of course.

Here comes the code:

Here is the code in GitHub.

That is all! 🙂


Tagged with: , , ,