--- layout: default nav: tutorial ---

# Bootstrap Confirm

This demo shows how to use Bootstrap confirmation dialogs with intercooler by using a custom event, fired when the confirm button is clicked on.

Note that the "server side" implementation is mocked out using mockjax, so you can see the entire implementation. Click the "Source Code" tab to see the code.

## Explanation

- The `#confirm-me` div is wired into the bootstrap confirmation library via a standard jQuery `click` event handler. This div also has a standard `ic-post-to` declaration, as well as an `ic-trigger-on` attribute which is set to the custom `confirmed-by-user` event.
- When the "Confirm" button is clicked on the bootstrap dialog, the `confirmed-by-user` event is triggered on the `#confirm-me` div, triggering an intercooler request.

## Demo

Click Me