/
home
/
efamember
/
domains
/
efa-member.com
/
public_html
/
efa.or
/
up file
home
<script> $(document).ready(function() { getDivWidth() }); // Get the button let mybutton = document.getElementById("myBtn"); let nav_con = document.getElementById("nav-con"); let header_img = document.getElementById("header_img"); let content = document.getElementById("content"); // When the user scrolls down 20px from the top of the document, show the button window.onscroll = function() { scrollFunction() }; function scrollFunction() { if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 20) { header_img.style.width = "20%"; mybutton.style.right = "0"; } else { // mybutton.style.display = "none"; mybutton.style.right = "-50px"; header_img.style.width = "40%"; } } // When the user clicks on the button, scroll to the top of the document function topFunction() { document.body.scrollTop = 0; document.documentElement.scrollTop = 0; } function getDivWidth() { const div = document.getElementById('top_div'); const divWidth = div.offsetHeight; // Get the width including padding and border content.style.marginTop = divWidth + "px"; } function LogoutConfirm() { swal({ title: "ยืนยันการออกจากระบบ ?", showCancelButton: true, confirmButtonColor: "#00CC00", confirmButtonText: "ยืนยัน", cancelButtonText: "ยกเลิก", closeOnConfirm: false }, function() { localStorage.clear(); $.ajax({ type: "POST", url: "logout.php", dataType: "json", success: function(data) { if (data.result == 1) { swal({ type: "success", title: "สำเร็จ", text: "คุณได้ออกจากระบบแล้ว", showConfirmButton: false }); setTimeout(() => { swal.close(); location.href = "https://efa-member.com/efa.or/"; }, 1000); } } }); }); } </script>