I have a pretty long page and a button at the very beginning of that page.
By clicking on the button I open a jQuery dialog:
$("#createNew").click(function () {
var button = $(this);
$("#createGalleryDialog").dialog({
modal: true,
title: 'Choose a Folder',
width: 400,
buttons: {
"Create": function () {
//Do some magic here
},
"Abort": function () { $(this).dialog("close"); }
}
});
At the beginning of the page I have a div, that looks like that:
<body>
...
<div id="createGalleryDialog">
DialogContent
</div>
<a href="#" id="createNew">Add a new Gallery</a>
...
some long content, that needs a scrollbar.
....
</body>
If I click on the link the dialog will open in the very center of the entire page, which means that it will jump to the middle of the page and places the dialog in the center.
I'd like to avoid that opening the dialog, causes the page to "scroll" to the middle of that page.
PS: Yes, I can of course position the dialog in relation to the button somewhere beyond it, but I'd like to have it right in the center middle of the windows (not the entire page)
Any ideas?
Thanks a lot
Dominik