<article>
<div><p></p></div>
<div><p></p></div>
<div><p></p></div>
<div><p></p></div>
<div><p></p></div>
<div><p></p></div>
<img/>
<p> i want to add element after this</p>
</article>
I have an article element in which many elements are its child i want to add a last element before closing tag of article element.
i want some code in jquery to do this randomly at runtime.
my intention is to add before article element the lastelemnt is just sample as here it can be div, ul, etc
Test
" ); I added the article > part. In that code, it will only get the last p element inside the article tag. – martinii Mar 29 '19 at 04:52Test
" ); try this. – martinii Mar 29 '19 at 04:55