3

ダイアログボタンの一種になるようにToastr jsをセットアップしようとしています。

必要なのは、Toastr メッセージの「承認」ボタンと「否認」ボタンだけです

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");

それが可能かどうか、またはそれを可能にする他のスクリプトを知っている人はいますか?

ご注意ください

これは Modal で実行できることはわかっていますが、回避したいと思います。

4

2 に答える 2

6

もちろん。トーストに任意の HTML を追加してから、イベント ハンドラーをそれに接続できます。詳細と例については、デモを参照してください。http://codeseven.github.io/toastr/demo.html

于 2014-07-08T23:34:31.687 に答える