I need to compare a word that is inside a variable, with the content of a paragraph, to be able to change the color .. I do not have even the palest idea of how it is done ... an example would be
var elemento = $('h1.ht-main-title').find('span');
var texto = $(elemento).text();
to get the word to compare within a div .. for example
<div>un libro de textos especimen. No sólo sobrevivió 500 años, sino que tambien ingresó como texto de relleno en documentos electrónicos, quedando esencialmente igual al original. Fue popularizado en los 60s con la creación de las hojas "Letraset", las cuales contenian pasajes de Lorem Ipsum, y más recientemente con software de autoedición, como por ejemplo Aldus PageMaker, el cual incluye versiones de Lorem Ipsum</div>
in this case for example if the word that is in the variable is Lorem, I need to paint it in red .. Any idea how to start?