css - jQuery modal height is too small -


i have dialog pops on $(document).ready(function() {, blocks whole page modal : true.

        $(function () {             $("#dialog").dialog({                 show: { effect: 'drop', direction: "up" },                 hide: "explode",                 modal: true,                 draggable: false,                 resizable: false             });         }); 

the problem when $(document).ready(function() { fires, images in page may not loaded.

it results in having overlay's height smaller page is.

(ex :) have page 2 images (height of 100px). when $(document).ready(function() { fires, have height of 800px, overlay appears, height of 800px. after that, when images had time load, have 1000px page... if scroll down, there 200px @ bottom not blocked overlay.


what i'm trying is, when $(window).load(function() { fire (so loaded), refresh height of overlay, if dialog had not been closed of course.

i noticed that, once of images loaded, if zoom +/- or if open chrome's developer tool, refreshes overlay height.

thank you!

i fixed it, wonder if there more efficient way this..

    $(function () {         $("#dialog").dialog({             show: { effect: 'drop', direction: "up" },             hide: "explode",             modal: true,             draggable: false,             resizable: false         });     });      $(window).load(function() {         $(window).resize();     }); 

so pop dialog, when images loaded, refresh size..


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -