Jquery - How to disable the entire page

后端 未结 8 2198
伪装坚强ぢ
伪装坚强ぢ 2020-12-05 19:31

I have this ajax event

function save_response_with_ajax(t){
  var form = $(\'#edit_\'+t);
  var div = $(\'#loading_\'+t);
  $.ajax({
    url: form.attr(\"act         


        
8条回答
  •  盖世英雄少女心
    2020-12-05 20:03

    var modal = $('
    ') .dialog({ modal: true }); modal.dialog('widget').hide(); setTimeout(function() { modal.dialog('close'); }, 2000); // to close it

    here is a demo: http://jsbin.com/avoyut/3/edit#javascript,html,live

    don't forget to call modal.dialog('close'); to end it all!

    this way you get the benefits of the actual dialog modal code, resizing, disabling, etc..

    hope this helps -ck

提交回复
热议问题