jQuery UI: How to use ui-widget-overlay by itself?
问题 I am trying to create an overlay, similar to the one that jQuery UI Dialog uses. I can create the overlay like this: var $overlay = $('<div class="ui-widget-overlay"></div>').hide().appendTo('body'); //...later in my script $overlay.fadeIn(); But the overlay cuts off when I scroll down. I noticed that jQuery UI is setting the width and height on that div dynamically. So I would like to reuse this functionality instead of reinventing the wheel. How can I create an overlay like this, or reuse