JQuery UI overlay without dialog

Possible duplicate:
jQuery UI: how to use ui-widget-overlay yourself?

I want the user not to change the screen during ajax calls. So I decided to use jQuery UI overlay (modal dialog overlay), but without any dialogue. I could not find a way to do this.

Is there any way to show modal without dialogue?

+2
source share
3 answers

I accept this answer from another SO question.

There is a violin here .

And the code:

$("body").append($.ui.dialog.overlay.create()) 
+4
source

In the dialog box with the modal option set to true, the following div is added where the width and height represent the viewport in the browser window:

 <div class="ui-widget-overlay" style="width: 607px; height: 350px; z-index: 1001;"></div> 

You can try something similar on your page. See http://jqueryui.com/dialog/#modal and then browse the source in the iframe demo for the full source.

+2
source

https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.dialog.js

Their code shows that they call _createOverlay() and _destroyOverlay() in widgets. You can try to create a dialog and start it with autoOpen:false , and then call these methods manually.

+1
source

Source: https://habr.com/ru/post/946262/


All Articles