Web サイトでユーザーがサポートを依頼できるチャット ウィンドウを作成しました。事は、彼が終わってウィンドウを閉じたいと思った後、チャットウィンドウを閉じる「X」を押すことです。しかし、私はここで div を作成しました。これは画面の中央に表示され、ウィンドウを本当に閉じたいかどうかを尋ねます。コードは次のとおりです。
<div id="background">
<div id="stay">
<p style="font-family:Tahoma, Geneva, sans-serif;font-weight:600;font-size:19px;margin-top:10px;">Exiting the support window will delete all the conversation you had with the staff and will disconnect you from the conversation. </p>
<p style="font-family:Tahoma, Geneva, sans-serif;font-weight:600;font-size:19px;">Are you sure you want to exit ?</p>
<div id="agree">
<p>Yes</p>
</div>
<div id="cancel">
<p>No</p>
</div>
</div><!--stay end-->
</div><!--background end-->
Jクエリ:
$("#exit").click(function() {
$("#livesupport").hide();
$('html, body').animate({scrollTop:0}, 'fast');
$("#background").toggle();
$("body").css({ 'overflow':'hidden' });
$.post('utility/rchat.php', { table: sessid } ,
function(getshiton) {
});
});
「#livesupport」はチャットウィンドウです。
ユーザーがそれを押すとページに戻り、ページに変更が加えられず、はいを押すとサポートウィンドウが閉じられるようにするにはどうすればよいですか。