It is possible to create an animation after reading a text with Three.js?

I have a code in jquery which is a txt file and animates after reading specific words from the text line by line.

like this.

if(lines[line].includes('(Deep Right wing)')){
                $("posicao").animate({left: "414", top: "75"}, 1000);

I would like to know if I could do this with three.js.

three.js is a 3D engine and not an alternative to jQuery. Unless you want to render text in 3D I’m afraid your question needs some clarification.