Change text color for every child in the string

55 Views Asked by At

I have implemented typing effect into my website using typed.js, which is working fine.

However, I wish to change the colour for every child in the string, each time it comes up.

For example:

   var typed = new Typed('#element', {
     strings: ['Blue','Red','Green'],
      typeSpeed: 50,
    });

Here, 'Blue' should come in blue colour, 'Red' in red colour and so on. Is there any possible solution to this?

0

There are 0 best solutions below