0

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.

1 Answer 1

0

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.