<div class="notification-bar"> <center><font color="green"><strong>NEED $$$ For Your Next Home Or Investment Property?</strong> </font> <a href="https://propertunityknocks.com/mortgageoptions?email=propknocks@gmail.com&firstlast=ryanhartman&utm_campaign=mortgagebar" target="_blank"><u> <strong>CLICK HERE To Learn About A Few "Creative" Mortgage Options</strong></u> </a> (For First Time Buyers, Investors, Business Owners, etc) </center> <button class="close-btn">x</button> </div> <!-- CSS code for the notification bar --> <style> .notification-bar { position: fixed; top: 0; width: 100%; background-color: #ffff99; color: #000; padding: 10px; font-size: 12px; z-index: 9999; } .close-btn { float: right; background-color: #000; color: #fff; border: none; padding: 5px 5px; font-size: 9px; cursor: pointer; } </style> <!-- JavaScript code for the notification bar --> <script> // check if the notification bar has already been shown in this session if (!sessionStorage.getItem('notificationBarShown')) { // set up the timing for the notification bar to appear setTimeout(function(){ document.querySelector('.notification-bar').style.display = 'block'; }, 5000); // add event listener for the close button document.querySelector('.close-btn').addEventListener('click', function(){ // hide the notification bar document.querySelector('.notification-bar').style.display = 'none'; // set a flag to indicate that the notification bar has been closed sessionStorage.setItem('notificationBarShown', 'true'); }); } </script>