I am trying to setup Toastr js to become sortof a dialog button.
All i need is an "Approve" and a "Disaprove" button on my Toastr message
toastr.options = {
"closeButton": true,
"debug": false,
"positionClass": "toast-bottom-left",
"onclick": null,
"showDuration": "1000",
"hideDuration": "1000",
"timeOut": "5000",
"extendedTimeOut": "1000",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
}
toastr.info("Do you wish to continue");
Does anyone know if that is possible or know any other script that allows me to?
Please note
I know this can be done with Modal but i want to try and avoid it.
Sure. You can add any HTML you want to the toast then hook up event handlers to it. See the demo for more details and examples. http://codeseven.github.io/toastr/demo.html
You can add buttons for toastr js.
For example a button for ok
is clicked to clear the toastr
:
toastr.info('message <button type="button" class="btn clear btn-toastr" onclick="toastr.clear()">OK</button>' , 'Studio Message:');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With