How do I make this popup Dynamic so I can change the discount code from the BM instead of changes in ISML?
ISML
<div id="discountPopup" class="hidden">
<p>Use code <strong>DISCOUNT20</strong> for 20% off!</p>
<button id="closePopup">Close</button>
</div>
My Javascript is
document.addEventListener('DOMContentLoaded', function() {
// Show the pop-up
document.getElementById('discountPopup').classList.remove('hidden');
// Hide the pop-up when the close button is clicked
document.getElementById('closePopup').addEventListener('click', function() {
document.getElementById('discountPopup').classList.add('hidden');
});
});