I have some Javascript code that executes a function whenever an element with a condition is clicked. The problem is that if a new element of that kind is added later on, it won't detect it by the code. This is my code:
$("li[data-episode]").on('click', function () {
setTimeout(Aradmey_Later, check_timeout);
});
How can I fix it so it always works, even on future elements?