It should work with the default plugin, even if the buttons are added later.

Be sure not to forget the attribute data-slide and to specify the target 
via data-target or href with the appropriate selector.

The plugn is using :

$('body').on('click.carousel.data-api', '[data-slide]', function ( e ) { /* ... 
*/ });


which is the up-to-date version of the live binding (delegated events).



On Tuesday, August 7, 2012 5:30:25 PM UTC+2, tslatt wrote:
>
> Instead of adding the prev/next buttons directly within the html, I append 
> it using jquery after the page loads. However, this makes the click event 
> for the prev/next buttons not work, since they are not there initially. How 
> can I update carousel.js to make the click events "live", ie work even when 
> the links are added later?
>
> Thanks in advance!
>

Reply via email to