Xat na lateral Direita Com Efeito (Deslizar)

4 de abr. de 2012

Olá pessoal, venho trazendo esse jeito bem legal e compacto de se colocar um xat no blog, espero que gostem...
Primeiro vai em MODELO, depois em EDITAR HTML
Depois ache a Tag:
]]></b:skin>
Agore cole acima dessa Tag esse código CSS:
/* Chat
----------------------------------------------- */
#gb{
position:fixed;
top:340px;
z-index:+1000;
right:-610px;
}
* html #gb{position:relative;}
.gbtab{
height:164px;
width:51px;
float:left;
cursor:pointer;
background:url('IMAGEM DO BOTÃO PARA ABRIR O CHAT') no-repeat;
}
.gbcontent{
float:left;
border:1px solid #000;
background: url(IMAGEM DE BACKGROUND PARA O CHAT)repeat;
padding:10px;
}
Depois ache a Tag:
</body>
E Cole esse próximo Código logo acima dessa Tag:
<script type='text/javascript'>
function showHideGB(){
var gb = document.getElementById(&quot;gb&quot;);
var w = gb.offsetWidth;
gb.opened ? moveGB(0, 30-w) : moveGB(20-w, 0);
gb.opened = !gb.opened;
}
function moveGB(x0, xf){
var gb = document.getElementById(&quot;gb&quot;);
var dx = Math.abs(x0-xf) &gt; 10 ? 5 : 1;
var dir = xf&gt;x0 ? 1 : -1;
var x = x0 + dx * dir;
gb.style.right = x.toString() + &quot;px&quot;;
if(x0!=xf){setTimeout(&quot;moveGB(&quot;+x+&quot;, &quot;+xf+&quot;)&quot;, 10);}
}
</script>


<div id='gb'>


<div class='gbtab' onclick='showHideGB()'> </div>


<div class='gbcontent'>


<!-- BEGIN CBOX - www.cbox.ws - v001 -->
<div style='line-height:0;background-position:center;width:590px;height:310px;'>


COLE O CÓDIGO EMBED DE SEU XAT AQUI


</div>
</div>
</div>

0 comentários:

Postar um comentário