When I try to close a window, the only thing that happens is de property display changes to ‘none’.
If I click the button to open the window again, the display property remains ‘none’ and the window is not shown.
If I destroy the div that contains the window, that’s ok, all html disappears, but if I try to reopen the window (recreating the div and the window), the window remais with display:none and nothing is shown.
How can I close a window and reopen it ?
$(‘<div id=”bbb”></div>’).appendTo(“body”);
$(‘#bbb’).append(‘<div></div><div id=”corpo_001″ style=”padding:0″></div>’);
$(‘<button type=”button” id=”btn_testex” class=”abs” style=”left:100px; top:250px; width:80px”>Clicar</button>’).appendTo(“body”);
$(“#btn_testex”).click(mostra_janela_utilizadores);
function mostra_janela_utilizadores() {
$(‘#bbb’).jqxWindow({
showCollapseButton: true,
height: 300,
width: 500,
theme:’energyblue’,
resizable: false,
isModal: false,
initContent: function () {
$.get( “frm_002_utilizadores.php”, function( data ) {
$( “#corpo_001” ).html( data );
$.getScript( “js/frm_002_utilizadores.js”)
.done(function( script, textStatus ) {
init_002();
})
.fail(function( jqxhr, settings, exception ) {
alert(“Erro ao carregar o script !”);
});
});
}
});
}