简体   繁体   中英

Make the popup modal window Scrollable in JQuery

I need to make the popup window using JQuery as Scrollable. could you tell me please what did I miss in the following code

$("#dvEnglish").dialog({ modal: true, width: '1300px', draggable: true, autoOpen: false });

The HTML is:

<div title="Search English" id="dvEnglish">
        <uc1:EnglishPopUp ID="EnglishPopUp1" runat="server" />
</div>

The Question has been updated. Thanks in Advance

From the documentation :

If the content length exceeds the maximum height, a scrollbar will automatically appear.

So simply pass in the maxHeight and make sure you have enough content to cause it to need the scroll bars.

$("#dvEnglish").dialog({ modal: true, maxHeight: 500px, width: '1300px', draggable: true, autoOpen: false });

By the way, always a good idea to check the documentation before coming to Stack Overflow.

Check if property overflow of your div with id dvEnglish is not hidden

It should be auto

FIDDLE

将ID为“ EnglishPopUp1”的弹出内容div的溢出属性设置为“自动”

$("#dvEnglish").dialog({ modal: true, width: '1300px',draggable: true,
autoOpen: false, resizable: false, height: '500',maxHeight: '480px'});

It will work like above, and also with overflow.

The all answers seems like true. Thanks for All

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM