Whatsapp Chat code
Place below code between <head> </head> of your website page <link rel="stylesheet" href="https://stylecod.com/chat/whatsapp.css" type='text/css' media="all" />
Place blow code anywhere in the page <div class="chat-popup"> <div class="chat-button" onclick="toggleChatMenu()"> <svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 24 24" fill="white"> <path d="M12 2C6.48 2 2 6.48 2 12c0 1.86.51 3.65 1.46 5.22-.36 1.58-.46 2.96-.28 4.07.05.36.3.65.65.65.94 0 2.29-.73 4.07-.28C9.35 22.49 10.86 23 12 23c5.52 0 10-4.48 10-10S17.52 2 12 2zm0 18c-1.01 0-2-.35-2.82-.96-.92-.66-1.72-1.54-2.36-2.59-.65-1.05-1.01-2.25-1.01-3.45 0-3.31 2.69-6 6-6s6 2.69 6 6-2.69 6-6 6z"/> </svg> </div> <div class="chat-menu" id="chatMenu"> <button class="close-button" onclick="closeChatMenu()">×</button> <p>Want to talk with us?</p> <a href="https://api.whatsapp.com/send?phone=&text=" target="_blank">Start Chat</a> </div> </div> <script> // Auto popup immediately after page load window.addEventListener('load', function() { document.getElementById('chatMenu').classList.add('active'); }); function toggleChatMenu() { const menu = document.getElementById('chatMenu'); menu.classList.toggle('active'); } function closeChatMenu() { document.getElementById('chatMenu').classList.remove('active'); } </script>