Closed bradbamford closed 9 years ago
Hello, Default alert template provides similar with native bootstrap alerts behavior for close buttons. If you want to hide alerts, you should provide custom template and specify your methods for hiding/showing. See example: http://jsfiddle.net/faulknercs/jq5L31w0/ Hope, this help you.
Thanks for the fiddle, that was helpful, I guess I need to work out an ObservableArray that uses the altertTemplate in order to have more than one display at a time.
Is it possible to add multiple alerts to the page and also have them auto timeout instead of having a close (X) button.
Using the following bindings, when a user clicks X, it's gone forever, and you can't use it again.
<div data-bind="alert: { message: notify().message, type: notify().type}"></div>
<scrip-t type="text/html" id="alertTemplate">
<p data-bind="text: notify.message()"></p>
<button class="btn btn-primary" data-dismiss="alert">Close</button>
</scrip-t>
Is it possible to add multiple alerts to the page, and reuse the same div binding?