开发者

Scroll bar defaulted in the middle of a dialog box with long text

开发者 https://www.devze.com 2023-04-10 08:53 出处:网络
Hello I use Jquery UI dialog box to put in some long text. Once I open the dialog box, it shows like this in default (It should show the upper part of the dialog box):

Hello I use Jquery UI dialog box to put in some long text.

Once I open the dialog box, it shows like this in default (It should show the upper part of the dialog box):

Scroll bar defaulted in the middle of a dialog box with long text

I try to change the $('.ui-dialog').css("top", "0px");to push the scroll bar to the top, but it is not working. Is there anyway 开发者_如何学JAVAI can fix this?

Thanks!


Try this

$('.ui-dialog').scrollTop(0);
0

精彩评论

暂无评论...
验证码 换一张
取 消