そのため、UI アイコンがクリックされたときに開くモーダルがあり、IE 以外のブラウザでは何らかの理由でモーダルが閉じません。これを行う簡単な方法はありますか?または、追加できるブラウザ仕様はありますか?
これが私のコードです:
<!-- Click function for modal -->
$(ui).click(function modal() {
el = document.getElementById("modal");
el.style.visibility = (el.style.visibility == "visible")?"hidden":"visible";
});
<div id="modal" class="modal" draggable="true">
<div>
<h3 style="text-decoration: underline"> Summary Report Table </h3>
<table id="summary">
<tr>
<th> Trans Count </th>
<th> Trans Amt </th>
<th> Match Count </th>
</tr>
<tr>
<td> 300 </td>
<td> $200,000 </td>
<td> 4 </td>
</tr>
</table>
<a href='#' onClick='modal()'>Close</a>
</div>
理由はわかりませんが、コードをインデントしたり戻したりすることはできません。読みづらくてすみません。