jQuery Dialog滚动到底部?

时间:2013-07-30 21:13:38

标签: jquery user-interface dialog scroll

似乎这个问题之前已经回答了几次,但我根本无法为我工作。我有一个加载信息的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");

}

0 个答案:

没有答案