2
Is it possible to place an element in the middle of an html code? Example:
I have the following article that has html:
<article>
<p>texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto</p>
<p>texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto</p>
<h2>Título 1</h2>
<p>texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto</p>
</article>
Let’s assume that I want to automatically always insert a list with some topics written right after the second paragraph in all articles.
<ul>
<li>elemento 1</li>
<li>elemento 2</li>
<li>elemento 2</li>
</ul>
Someone has an article, a link, or can give me a direction. I believe that with Jquery it is possible. In worpress there are plugins that do this, but it is a project outside of WP.
has nothing to do with css and alignment. For example, insert a list always after the second paragraph, for example.
– Rod
Imagine an article, has the first paragraph, the second, the third. At some point I want to make a call in the middle of the text to another page. This election would be a list, as I put it in the question, and that is right after the second paragraph. I want to do this automatically.
– Rod
Possible duplicate: Create div among others instead of at the end with Javascript
– LipESprY