Any JQuery alert() replacement for JavaScript's native one?

前端 未结 9 1102
心在旅途
心在旅途 2021-02-06 16:32

I would like to replace the native javascript alert() with my own, so that I would be able to control the theme and have it more JQueryUI look and feel. I\'ve tried numerous alt

9条回答
  •  眼角桃花
    2021-02-06 16:44

    You can easily mimic the synchronicity of regular js alerts using jQueryUI Dialog boxes. Simply use the events provided -- in this case, close, which is called when you close a dialog box:

    Dialog
    Another dialog
    $("#dialog").dialog({ close: function(event, ui) { $("#dialog2").dialog(); } });

    Now, when you close the first dialog, the second opens.

提交回复
热议问题