Hello,
I using jquery-ui 1.8, jquery 1.4
I meet the strange problem: on the some pages .dialog('option','position',[left,right]); does not work,
The code for dialog generation almost the same, js console not report any error, but if i change 'position' option it drop dialog to left-top postion (even if i pass real coordinates [400,400] for example).
The code is like the following:
- $j=jQuery.noConflict();
- d_id=gen_id(); //return 'Dialog_444_555_45' for example
- text="test';
- text="<div id='"+d_id+"'>"+text+"</div>";
- $j('body').append(text);
- $j('#'+d_id).ready(function() {
- $j('#'+d_id).dialog({width:"auto",height:"auto",modal:false, close: function(event, ui) {$j(this).remove();} });
- $j('#'+d_id).dialog( "option", "title","some title");
- if ($j('#'+d_id).width()>700) {$j('#'+d_id).dialog( "option", "width",700);}
- if ($j('#'+d_id).height()>300) {$j('#'+d_id).dialog( "option", "height",300);}
- $j('#'+d_id).dialog( "option", "position",[500,500]);
- });
the problem that same code works fine on other page, i not sure, may be it think that window size is 0, but I not understand why.
After dialog is already created, i also can't control it from javascript console, i.e. if i pass it position it jump to top-left, but if i drag it over the screen it setup good coordinates in own position option.
ps: sorry for random string in name, just to not conflict with other posts.