I have an html ul
list and a button add that creates new li
elements.
What i need is to call a function after the new li
element is created but i'm facing the problem that the click event (or what ever it does) of the button with the function to add the new li
element is unaccessible to me, so the only way i can access is thru a new event bind to the button.
If i create a new bind event to the button, i can't make anything because the event is fired before the new li
is created.
$addButton.bind("click", myFunction);
So what i need is something that can detect that the new li
was added to the main ul
.
What's the best approach?
And i repeat just in case... i can't access the function that creates the li
element.