', { id: 'user_alert_dropdown', class: 'absolute w400px top60 right0 pt12 pb12 pr20 pl20 bg-FFFFFF br12 bx-0-4-12-0-A3A3A359 text-center z1000000' }).appendTo('body');}$.ajax({url:'https://www.memoryverses.com/process/notifications/get_alerts.php',type:'POST',data:{ user_id: 0 }, dataType: 'html', success: function(response) { alertDropdown.html(response); alertDropdown.removeClass('display-none-important'); var totalBatches = parseInt($('#user_alerts_wrapper').data('total-batches')) || 0; console.log("Total batches:", totalBatches);if(totalBatches>0) { initializeAlertPagination(totalBatches); } }, error:function(xhr, status, error) { console.error("AJAX error: " + status + ": " + error);}}); }else{ console.log("Hiding alert dropdown"); alertDropdown.addClass('display-none-important'); } console.log("Alert Dropdown State:", !alertDropdown.hasClass('display-none-important')); console.log("Alert Dropdown HTML:", alertDropdown.html()); }function initializeAlertPagination(totalBatches) {totalBatches = Number(totalBatches);var currentBatch = 1;function updatePaginationButtons() {console.log("Update Pagination Buttons - Current Batch:", currentBatch, "Total Batches:", totalBatches);$('#prev_alerts').toggleClass('display-none-important', currentBatch === 1);$('#load_more_alerts').toggleClass('display-none-important', currentBatch === totalBatches);}function showBatch(batchNumber) {console.log("Showing batch:", batchNumber);$('.batch-' + currentBatch).addClass('display-none-important');$('.batch-' + batchNumber).removeClass('display-none-important');currentBatch = Number(batchNumber);updatePaginationButtons();markAlertsAsSeen(currentBatch);} function markAlertsAsSeen(batchNumber){$('.batch-' + batchNumber + ':not(.seen)').each(function (){var alertId=$(this).data('alert-id'); var alertType=$(this).data('alert-type'); var user_id = 0;if (alertId){$(this).addClass('seen');$.ajax({url:'https://www.memoryverses.com/process/notifications/seen.php',type:'POST',data:{ alert_id: alertId, alert_type: alertType, user_id: user_id },success:function (response){console.log("Seen => " + response);}});}}); }$('#user_alert_dropdown').off('click','#load_more_alerts').on('click','#load_more_alerts',function(){if (currentBatch < totalBatches) {showBatch(currentBatch + 1);}});$('#user_alert_dropdown').off('click','#prev_alerts').on('click','#prev_alerts',function(){if (currentBatch > 1) {showBatch(currentBatch - 1);}});updatePaginationButtons();markAlertsAsSeen(currentBatch);} $(document).click(function(event){var target=$(event.target);if(!target.closest(".header-picture").length && !target.closest("#dropdown").length){$("#dropdown").addClass("display-none"); } var alertDropdown=$("#user_alert_dropdown");if(alertDropdown.length && !target.closest("#user_alert_dropdown").length && !target.closest(".relative").length) { alertDropdown.addClass("display-none-important");}});$(".logout").click(function(){ $.post("https://www.memoryverses.com/process/logout.php", { user_id: 0 }, function(response) { location.reload();});});$(document).on('click','#user_alert_dropdown a',function(e){ e.stopPropagation();});
Delete Translation
*Only you will see this translation*
*Please make sure the scripture you are memorizing is accurate*