I have HTML list:
<ul>
contains initial items of:
<li>
I have added new items dynamically to that list. Old items are responding very well , but the new ones cannot be triggered for the same event.
I am using (.on) event as per JQuery documentation to trigger the current and future elements. But still not responding.
$(".favorite-btn").on("click",function(){
alert("Yes!");
});
Could you help ?