I am using jQuery UI to display a dialog but I would like to reposition the window exactly under the button when it opens.
Can someone help me with that?
The code:
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use offset() and outerHeight() to compute the appropriate coordinates, and the position option to reposition the dialog widget:
Updated fiddle here.
EDIT: Using the same button to close the dialog involves checking its status in your
clickhandler:Updated fiddle there.