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

前端 未结 9 893
心在旅途
心在旅途 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 17:02

    In the mean time i also recently created a new function to allow confirm boxes with jqueryui dialog.

    It is extremely easy to use

    dlgConfirm('Are you sure you want to cancel this change-email request? 
    ', 'Cancel Email Change', 'Continue', function(dlg){ //do ajax or something return false; //do not close dialog until ajax is complete } dlgConfirm('Are you sure you want to submit this form', function(dlg){ $('form', dlg).submit(); return true; });

    Here is the source code (public domain):

    
    

提交回复
热议问题