Make JQuery UI Dialog automatically grow HEIGHT to fit its contents (width remains static)

后端 未结 4 1869
名媛妹妹
名媛妹妹 2021-02-08 00:12

Having looked into Make JQuery UI Dialog automatically grow or shrink to fit its contents, I am using the height: \"auto\" option when building a jQuery modal dialo

4条回答
  •  独厮守ぢ
    2021-02-08 00:47

    Here is the sample demo

     $( "#dialog-message" ).dialog({
            modal: true,
            height: "auto",
                    buttons: {
                        Ok: function() {
                            $( this ).dialog( "close" );
                        }
                    }
    
                });
                setTimeout(function() {
                $('#inside').append("Hello!
    "); setTimeout(arguments.callee, 1000); },1000);​

提交回复
热议问题