0

似乎这个问题之前已经回答过几次了,但我根本无法为我工作。我有一个加载信息的 jQuery 对话框弹出窗口,我希望对话框在加载后自动滚动到表单的底部。我尝试使用 jQuery scrollTop: 属性,但它尝试在加载所有内容之前滚动,因此一旦弹出窗口完全加载,它就不会出现在页面末尾。有没有人有任何想法?

function viewdialog(dialogid,docname) {
    var state = true;
    var ev;
    $(dialogid).dialog( {
        title: "Some Title" + docname,
        autoOpen: false,
        height: 600,
        width: 800,
        modal: true,
        position: dialogposition,
        show: {
        effect: "slide",
        duration: 500
            },
        hide: {
        effect: "puff",
        duration: 500
            },
        buttons: {

        Resize: function(){

                if (state) {
                     $(dialogid).effect( "size", { to: { width: 1000,height: 800 },scale:"box"  } );}
                else {  $(dialogid).effect( "size", { to: { width: 800,height: 600 },scale:"box" });}
                state = !state;
                },
        Close: function() {
          $( this ).dialog( "close" );
                } 
            }

   });
    $(dialogid).dialog("open");

}
4

0 回答 0