Я успешно создал диалоговое окно с включенным изменением размера, но для моего проекта мне нужны высота и ширина открытого диалогового окна после изменения его размера пользователем.
Я создал кнопку с id = opener и div с id = dialog. Может ли кто-нибудь помочь мне, если возможно.
Javascript:
// increase the default animation speed to exaggerate the effect
$.fx.speeds._default = 1000;
$(function()
{
$( "#dialog" ).dialog(
{
modal:true,
autoOpen: false,
show: "blind",
hide: "explode",
buttons: [
{
text: "Ok",
click: function() { $(this).dialog("close"); }
}] ,
resizable: true,
width:'auto',
height:'auto'
});
$( "#opener" ).click(function()
{
$( "#dialog" ).dialog( "open" );
return false;
});
});
HTML:
<body>
<div class="demo">
<div id="dialog" title="Basic dialog">
<p>My content here. I want to show the height and width of my dialog after it is resized by a user
</p>
</div>
<button id="opener">Open Dialog</button>
</div>
</body>