I have an issue after adding a element dynamically it doesn\'t have the click event, so i have the following:
$(\".myclass > li\").click(function () {
...
You need to use Event Delegation. You have to use .on() using delegated-events approach.
i.e.
$(document).on('event','selector',callback_function)
In your case
$(document).on('click', '.myclass > li', function () {
...
});
OR if you want to apply to ALL list items:
$(".myclass").on('click', '> li', function () {
...
});