สอบถามเรื่องจะทำปุ่มปิด แบนเนอร์โฆษณา ได้ยังงัยคะ

เริ่มโดย pum_pam, 23 เมษายน 2019, 16:01:31

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

pum_pam

สอบถามผู้รู้ค่ะ คืออยากทำแบนเนอร์โฆษณาบนเว็บเหมือน ads ของ google  แสดงมุมล่าง  และมีปุ่มปิด เมื่อไม่อยากให้แบนเนอร์ แสดง ถ้า Code เหมือนด้านล่างเราจะเพิ่มคำสั่งปิด แบนเนอร์เข้าไปได้อย่างไรคะ

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
#banner{
   border:0px solid #000;
   display: none;
   position: fixed;
   bottom: 0px;
   right: 0px;
   z-index: 9998;
}
</style>
</head>
<body>
<a id="banner" href="https://www.codebee.co.th/labs/วิธีทำ-banner-ให้เว็บไซต์/"><img src="700x252.jpg" ></img></a>
<script>
$(document).ready(function(e) {
$(window).scroll(function() {
if($(window).scrollTop() <= 10){
$("#banner").hide("fast");
}else{
$("#banner").show("fast");
}
});
});
</script>
</body>
</html>



djopor

ใส่ปุ่มหรือข้อความตามตำแหน่งที่ต้องการแล้วใช้คำสั่ง $("#banner").hide(): ครับ

รับทำเว็บไซต์, CMS, Android App,IOS App ตามสั่งตามเงิน สนใจ ดูผลงานและทักมาสอบถามได้ครับ [direct=http://www.suk13.com]ช่องทางติดต่อ[/direct]


[direct=http://www.suk13.com]Freelance Website[/direct] [direct=https://affiliate.fastcomet.com/scripts/2wc9ym?a_aid=600505d3833bf]Fast Host inter[/direct]
[direct=https://t.me/dp2341ch]P2E[/direct]