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?
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()
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With