我有以下问题:
我使用jQuery UI打开了一个对话框。该对话框包含大量内容,无法一次性显示所有内容。
是否可以滚动到对话框内的特定元素?
我使用jQuery UI打开了一个对话框。该对话框包含大量内容,无法一次性显示所有内容。
是否可以滚动到对话框内的特定元素?
之前的问题答案:
var container = $('div'),
scrollTo = $('#row_8');
container.scrollTop(
scrollTo.offset().top - container.offset().top + container.scrollTop()
);
// Or you can animate the scrolling:
container.animate({
scrollTop: scrollTo.offset().top - container.offset().top + container.scrollTop()
});
div
,所以它也可以在其中工作。 - Darbio