Infinite List onClick not working


#1

Hi,
I have an infinite list that has a button on each li to open a dialog.
The problem is that it works for the 10 first li. the one dynamically added on scroll down are not triggering the onClick

<button class="button .open-dialog">open dialog</button> 

$$('.open-dialog').on('click', function(){
    app.dialog.confirm("Are You Sure???", "Title", function () {
        app.dialog.progress("Confirming...");
    });
});

#2

you need to bind the event, after the next 10 li are rendered.