I have modal dialog. I want to position it according to variable that i get. I just concerned on Y-position and for X-position I just put 'middle' and it's worked.
Is it possible for me to put variable in my modal window position just like my last line?
My idea is where ever user click, the modal dialog will appear upper the clicked position
here is how i get the y-position (onclcick)
var curr = e.pageY - $(window).scrollTop();
$('#spnCursor').val(curr);
This code to get the variable value
$(function() {
var cursor = $('#spnCursor').val();
var msgposition = cursor - 300;
$( "#dialog-form" ).dialog({
position: ['middle','msgposition'],
Thanks.