html - jQuery popup window scrolling -


i'm trying create popup using jquery .dialog function. dialog popping , closes when hitting close button. have problem position of dialog. opens on middle of window, not scroll down when user scrolls down.

i'm calling popup in way:

function onclick(id, name, state, func){     $("#popup").dialog('open');     $("#popup").dialog('option', 'title', name);     $("#popup").html('<div id="content"><p>variables used in here</p></div>'); } 

i don't know if right way, i'm not familiar web development. function fired i'm not happy position of popup. tried positioning using css position, margin properties, without success.

do have remember or how can achieve this?

add position:fixed dialog, in example: http://jsfiddle.net/db5sx/6662/

i made body 1000px height can see how behaves when scrolling.

this keep dialog is.


Comments