how can i set the scrollbar in my dialog to be set to bottom by default, so that when the dialog opens, the scrollbar is at the bottom
$( "#report-dialog" ).dialog({
modal: true,
autoOpen: false,
show: "blind",
hide: "fold",
width: 850,
height: 600,
buttons: {
Close: function() {
$( this ).dialog( "close" );
}
}
});
You can do it like this:
The first scrollTop sets the scroll when the dialog opens, but apparently jQueryUI resets the scroll when the animation is finished, so we add another function to the element’s parent queue(the one doing the animation), so it can reset the height again after the animation is finished.