<style> #error_modal.modal { display: none; position: fixed; z-index: 10001; padding-top: 200px; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0.4); } #error_modal .modal-content { background-color: #fefefe; margin: auto; padding: 20px; border: 1px solid #888; width: 500px;; } #error_modal .modal-content .modal-header { padding: 0px; border-bottom: none; } #error_modal .modal-content .modal-header img { width: 30px; vertical-align: middle; } #error_modal .modal-content .modal-header span { font-size: 25px; font-weight: bold; vertical-align: middle; } #error_modal .modal-content .modal-body p { margin-bottom: 20px; } #error_modal .modal-content .modal-body a { font-weight: bold; } #error_modal .modal-content .modal-footer { border-top: none; padding: 5px; } #error_modal .modal-content .modal-footer .alert-btn-continue { padding: 10px; border-radius: 5px; background: #FA9401; color: white; font-weight: bold; text-decoration: unset; margin-right: 10px; } #error_modal .modal-content .modal-footer .alert-btn-cancel { padding: 10px; text-decoration: unset; color: #333; border-radius: 5px; background-color: #F3F3F3; font-weight: bold; } #error_modal .modal-content .modal-footer a.disabled { color: currentColor; cursor: not-allowed; opacity: 0.5; text-decoration: none; }</style><script> function showErrorModal(errorMessage) { $('#error_modal .error-message').html(errorMessage); $('#error_modal .alert-btn-cancel').removeClass('disabled'); $('#error_modal .alert-btn-continue').removeClass('disabled'); $('#error_modal').show(); } function closeErrorModal() { $('#error_modal .error-message').html(''); $('#error_modal').hide(); } $(document).on('click', '.see-the-cart', function () { $('#error_modal .alert-btn-cancel').addClass('disabled'); $('#error_modal .alert-btn-continue').addClass('disabled'); })</script><div id="error_modal" class="modal"> <div class="modal-content"> <div class="modal-header"> <img src="/stylesheets/images/icons-png/warning.png"/> <span>注意</span> </div> <div class="modal-body"> <p class="error-message"></p> </div> <div class="modal-footer"> <a class="alert-btn-continue see-the-cart" href="{{ url("cart") }}">カートを見る</a> <a class="alert-btn-cancel" onclick="closeErrorModal();" href="javascript:void(0);">キャンセル</a> </div> </div></div>