You need to cover the entire site window with a translucent layer, which will turn on when a window appears with a message. The old script does when loading windows so

$("#fuzz").css("height", $(document).height()); 

But the fact is that I have dynamically expanding areas on 2 pages (this is a graph and a visual editor), and that’s where it fails. I was looking for something like jquery bind document.body.clientWidth but could not find it. English stackoverflow did not solve this problem. Tell me the solution, but for now I’ll confine myself to 10 seconds

 window.SetInterval -> $("#fuzz").css("height", $(document).height()); 

everyone understands that this is not an option, because expensive computer resources will be spent and the update may not come in time.

    3 answers 3

    Try this option:

     body,html { height:100%; min-height:100%; } .shadow { width:100%; height:100%; position: fixed; top:0px;left:0px; background-color: black; opacity: 0.55; filter: alpha(opacity=55); display: none; z-index:1000; } 

    Popup window, put the z-index: 1001; When the window appears:

     $('.shadow').fadeIn(); 

    If nothing nakosyachili during layout, should drag on height

      Maybe this will help - jQuery Dialog

      • Not. I REFUSED jquery UI - the other day I even designed everything into a plugin. And I will not put the PILE UI for the sake of this. Rummaging through their code too. You need some kind of a clear solution for a couple of lines of code. - jfjgjkslxd
        // javascript function showloader(param) { if ( param=='hide' ) { $('overlayer').style.display = 'none'; } else { $('overlayer').style.display = ''; } } //css .overlayer{ background-color: #000000; cursor: pointer; height: 100%; left: 0; position: fixed; top: 0; width: 100%; z-index: 9999; visibility: visible; opacity: 0.8; } //пример <div id="overlayer"><a onclick="showloader(hide)">выключить</a></div> <a onclick="showloader(show)">включить</a> 

      work example

      • I'll try. But you all lured. $ ('overlayer') - where is the dot (.) or rasp (#)? If id = "overlayer", then in CSS #overlayer {, and in JS $ ('# overlayer')! - jfjgjkslxd
      • Yes, sorry. As for "all lured," you have a little excited. - Ozim pm
      • Forgot to add, abbreviations like $ ('overlayer'). Style.display is from jquery, replace with document.getElementById ('overlayer'). Style.display - something like that. - Ozim