-2
I want you where you are text take for example <div> novo texto </div>
, I was wondering if you could do this.
In short, I want everywhere on the site to have the floor text change to a DIV and summarize the previous text.
UPDATE
I was able to do what I wanted with that code
$("p:contains('Esgotado')").replaceWith("<div id='esgotado'>SEM ESTOQUE</div>");
With this everywhere on the site that has the word "sold out" inside a tag <p> Esgotado </p>
mute to <div id='esgotado'>SEM ESTOQUE</div>
texto_html.replace('texto', '<div> novo texto </div>');
– Augusto Vasques
gave the error in the console (texto_html is not defined), I changed the name I want to replace that is EXHAUSTED and still gave error.
– Walyson Patric
You can’t put one
<div>
within a paragraph goes against the recommendations of W3C. Even if the browser today supports this behavior nothing guarantees that in a future change this behavior is abolished and starts generating syntax errors. Test in validator of W3C and here a recommence on phrased content.– Augusto Vasques