Advertisement
Hai sobat, ketemu lagi dengan admin blog ini :) nah kali ini saya akan memberikan cara untuk membuat like box melayang pada saat pertama kali membuka blog.
T : Apa keuntungan menggunakan likebox melayang?
J : Agar memancing pengunjung me like fan page kita dengan tujuan supaya pengunjung selalu update dengan postingan artikel kita melalui fan page tadi.
oke langsung menuju ke TKPnya gan.
- login ke bloger.com
- pilih tata letak > tambah gadged > tambahkan HTML/Javascript
- kemudian copy dan pastekan script dibawah ini :
<style type="text/css">#topbar{position:absolute; padding-left:350px;padding-top:200px;background-color:transparancy;width: 300px;visibility: hidden;z-index: 100;}</style><script type="text/javascript">var persistclose=0,startX=30,startY=5,verticalpos="fromtop";function iecompattest(){return document.compatMode&&"BackCompat"!=document.compatMode?document.documentElement:document.body}function get_cookie(b){var b=b+"=",c="";0<document.cookie.length&&(offset=document.cookie.indexOf(b),-1!=offset&&(offset+=b.length,end=document.cookie.indexOf(";",offset),-1==end&&(end=document.cookie.length),c=unescape(document.cookie.substring(offset,end))));return c} function closebar(){persistclose&&(document.cookie="remainclosed=1");document.getElementById("topbar").style.visibility="hidden"} function staticbar(){barheight=document.getElementById("topbar").offsetHeight;var b=-1!=navigator.appName.indexOf("Netscape")||window.opera,c=document;window.stayTopLeft=function(){if("fromtop"==verticalpos){var a=b?pageYOffset:iecompattest().scrollTop;ftlObj.y+=(a+startY-ftlObj.y)/8}else a=b?pageYOffset+innerHeight-barheight:iecompattest().scrollTop+iecompattest().clientHeight-barheight,ftlObj.y+=(a-startY-ftlObj.y)/8;ftlObj.sP(ftlObj.x,ftlObj.y);setTimeout("stayTopLeft()",10)};var a=c.getElementById("topbar"); if(!persistclose||persistclose&&""==get_cookie("remainclosed"))a.style.visibility="visible";c.layers&&(a.style=a);a.sP=function(a,b){this.style.left=a+"px";this.style.top=b+"px"};a.x=startX;"fromtop"==verticalpos?a.y=startY:(a.y=b?pageYOffset+innerHeight:iecompattest().scrollTop+iecompattest().clientHeight,a.y-=startY);ftlObj=a;stayTopLeft()} window.addEventListener?window.addEventListener("load",staticbar,!1):window.attachEvent?window.attachEvent("onload",staticbar):document.getElementById&&(window.onload=staticbar);</script><br /><div class="clear"></div><div id="topbar"><table border="1" bgcolor="#fff"><tr><td><div style="text-align: right;"><a href="" onclick="closebar(); return false"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp-xqI-5cAjVJ2xt-Xt5MO2-hbr_1fEaZHSY-vhwj6bHWLC5LBrAHcH7snFuJMgNgvY3qhlz3yJQFEWm3Ba7xuqxKnBgozEBr0r6hu9baIa62JtYCHpqvYiM2ltUH8vGJCuWoHdPFxBoM/s1600/close-1.gif" /></a></div><center><div style="background: #fff;">Masukkan script Like Facebook sobat disini</div></center></td></tr></table></div>
- Pilih simpan dan hasilnya akan terlihat seperti gambar
0 Response to "cara membuat like box melayang di blog"
Post a Comment