When I open a defaul jquery-ui dialog, using jquery-ui 1.9.1 and jquery 1.8.2, the screen scroll down and then the dialog appears. It happens only in the first click, the second time the screen not goes down.
Here is how I’m trying to open that:
$("#btn").click(function (event) {
$("#btn").off();
Common.dialog();
event.preventDefault();
});
In Common.dialog I have a default jquery-ui dialog.
The dialog source was using a .load, then its is opened in the end of the document, in first time.
After that, the dialod was already loaded to the memory and the scroll not happens.
I correct the code cuting of the file and putting it contents in a object.