I want to insert a li tag into all ul that have the class or id 'father' . And that ends something like this:
<ul id='padre'>
<li id='hijo'></li>
<li id='hijo'></li>
</ul>
<ul id='padre'>
<li id='hijo'></li>
<li id='hijo'></li>
<li id='hijo'></li>
</ul>
<ul id='padre'>
<li id='hijo'></li>
<li id='hijo'></li>
<li id='hijo'></li>
</ul>
The code I'm using is this
$(document).ready(function () {
$('#padre').after('<li>NIVEL 3</li>');
});
But just add that li to the first ul that has the id 'parent'