Chatbox Jqueri Slide Vertikal
by dharlaferdana
May 23, 2013
HTML
<div class="panel">
<p>Kode script ChatBox Anda atau bisa diganti dengan kode widget atau apa sajalah terserah.....!</p>
</div>
<a class="trigger" href="#">ChatBox</a>
CSS
body {
background:#ccc;
}
.panel p {
color:#fff;
}
.panel {
position: fixed;
top: 104px;
left: 0;
background: #000;
border-radius-topright: 10px;
border-top-right-radius: 10px;
border-radius-bottomright: 10px;
border-bottom-right-radius: 10px;
border: 1px solid #444;
width: 330px;
height: auto;
filter: alpha(opacity=85);
-moz-opacity: 0.85;
opacity: 0.85;
display: none;
padding: 30px 30px 30px 100px;
}
.panel p {
color: #ccc;
margin: 0 0 15px;
padding: 0;
}
.panel a,.panel a:visited {
color: #9FC54E;
text-decoration: none;
border-bottom: 1px solid #9FC54E;
margin: 0;
padding: 0;
}
.panel a:hover,.panel a:visited:hover {
color: #fff;
text-decoration: none;
border-bottom: 1px solid #fff;
margin: 0;
padding: 0;
}
a.trigger {
position: fixed;
text-decoration: none;
top: 50px;
left: 0;
font-size: 16px;
letter-spacing: -1px;
font-family: verdana, helvetica, arial, sans-serif;
color: #fff;
font-weight: 700;
background: #333 url(http://lh6.ggpht.com/_xcD4JK_dIjU/S4QDwX8gRPI/AAAAAAAAD2U/TdhwLYRRzzA/d/plus.png) 85% 55% no-repeat;
border: 1px solid #444;
border-radius-topright: 10px;
border-top-right-radius: 10px;
border-radius-bottomright: 10px;
border-bottom-right-radius: 10px;
border-radius-bottomleft: 0;
border-bottom-left-radius: 0;
display: block;
padding: 15px 40px 15px 15px;
}
a.trigger:hover {
position: fixed;
text-decoration: none;
top: 50px;
left: 0;
font-size: 16px;
letter-spacing: -1px;
font-family: verdana, helvetica, arial, sans-serif;
color: #fff;
font-weight: 700;
background: #222 url(http://lh6.ggpht.com/_xcD4JK_dIjU/S4QDwX8gRPI/AAAAAAAAD2U/TdhwLYRRzzA/d/plus.png) 85% 55% no-repeat;
border: 1px solid #444;
border-radius-topright: 10px;
border-top-right-radius: 10px;
border-radius-bottomright: 10px;
...
JavaScript
$(document).ready(function () {
$(".trigger").click(function () {
$(".panel").toggle("fast");
$(this).toggleClass("active");
return false;
});
});