6

I have the following issue:

I open a dialog box with jQuery UI. This dialog box contains a lot of content, which can't be displayed at once.

Is it possible to scroll to a specific element within the dialog box?

Christian Kolb
  • 1,251
  • 2
  • 20
  • 42

1 Answers1

9

Possible duplicate

Answer from previous question:

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()
});​
Community
  • 1
  • 1
Darbio
  • 10,681
  • 12
  • 55
  • 98