In your close button, you call hide() .
Modify the getAjax function as follows:
function getAjax(divdett,pageload) { $(function(){$(divdett).load(pageload).show();});}
I just added .show() to make sure the div is visible even if it was hidden before.
Note that I respected the original design, but it's too complicated: there is no need to call $(function , when you can just do
function getAjax(divdett,pageload) { $(divdett).load(pageload).show();}
If you want to have only one button, you can delete one from the second file and change the getAjax function to
function getAjax(divdett,pageload) { var div = $(divdett); if (div.is(':visible')) div.hide(); else div.load(pageload).show(); }
Denys seguret
source share