The jQuery UI dialog box is displayed at the top of the page while the page is loading.

I have a jQuery dialog on my website. I give a div on the "dialog" id page, the contents of which become the contents of the dialog box. However, when the page loads, this div appears at the top of the page and looks bad. Does anyone know how to deal with this?

+3
source share
2 answers

Hide your div through your CSS file:

#dialog {display: none}

This will not affect its actual display when opening a dialog.

I tested to make sure, and this method worked with jQuery UI 1.7.2

+9
source

, (, .show() .hide()], , jQueryUI, . , div display:none , .

+1

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


All Articles