PopUP kod lazım
2
●116
- 01-03-2023, 02:08:21Üyeliği durdurulduHTML kodunu popupun çıkması istediğin sayfaya yerleştir.
<div id="popup" style="display:none"> <p>Popup içeriği bootstrap vs. kullanabilirsin.</p> </div>
Bu koduda jquery cdn veya local olarak dahil edip altına ekle.
$(document).ready(function() { if(localStorage.getItem('popupAcildi') == null) { localStorage.setItem('popupAcildi ', 'yes'); $('#popup').fadeIn(); } }); - 01-03-2023, 02:21:1372. satırdan süreyi ayarlayabilirsin.
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body {font-family: Arial, Helvetica, sans-serif;} .modal { display: none; /* Hidden by default */ position: fixed; /* Stay in place */ z-index: 1; /* Sit on top */ padding-top: 100px; /* Location of the box */ left: 0; top: 0; width: 100%; /* Full width */ height: 100%; /* Full height */ overflow: auto; /* Enable scroll if needed */ background-color: rgb(0,0,0); /* Fallback color */ background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ } .modal-content { background-color: #fefefe; margin: auto; padding: 20px; border: 1px solid #888; width: 80%; } .close { color: #aaaaaa; float: right; font-size: 28px; font-weight: bold; } .close:hover, .close:focus { color: #000; text-decoration: none; cursor: pointer; } </style> </head> <body> <h2>Demo Site</h2> <div id="popUp" class="modal"> <div class="modal-content"> <span class="close">×</span> <p>Demo içerik</p> </div> </div> <script> var modal = document.getElementById("popUp"); var span = document.getElementsByClassName("close")[0]; span.onclick = function() { modal.style.display = "none"; } window.onclick = function(event) { if (event.target == modal) { modal.style.display = "none"; } } function PopUp(e){ if (document.cookie.indexOf("popupGoster=true") == -1) { document.cookie = "popupGoster=true; max-age=86400"; modal.style.display = "block"; } } window.onload = function(){ setTimeout(function(){ PopUp('show'); },25); } </script> </body> </html>