Attractive Hover use jQuery
Make an attractive hover use jQuery
by Beben Koben
HTML
<h1>Tutorial Blog for Stylish Blogger</h1>
<p class="cred" align="center"> Creativity by <a href="http://ben-tools.blogspot.com/">Beben Koben</a></p>
<footer>
<a class="orig" href="http://beben-koben.blogspot.com/2014/02/make-attractive-hover-use-jquery.html" title="GO BACK TO ARTICLE"> « BACK TO</a>
<div id="bybbn">
<img src="http://placehold.it/125x35.png/21416b/debe94&text=Beben%20Koben" />
<img id="bbntic" src="http://2.bp.blogspot.com/-xxzY22MJF9Y/Td-RX5EtZAI/AAAAAAAADU0/gr56zRIVBns/s65/beben-koben.png" /> <label> Visit us!</label>
</div>
</footer>
CSS
*{margin:0;padding:0;}
body{background:#debe94;color:#000;font:15px Calibri, Arial, sans-serif;text-shadow:1px 1px 1px #FFFFFF;padding:10px;}
a,a:visited{text-decoration:none;outline:none;color:#a00;}
a:hover{color:#fff;}
footer{background:#D3A76F;position:fixed;width:100%;border-top:1px solid #333;height:70px;bottom:0;left:0;color:#fff;text-shadow:1px 2px 0 #000;}
footer a.orig,a.orig:visited {-webkit-box-shadow:0px 0px 20px #000;box-shadow:0px 0px 20px #000;-webkit-border-radius:5px;border-radius:5px;
text-decoration:blink;
font-weight:bold;
color:#f00;
font-size:14px;
line-height:46px;
margin:12px 0 0 -405px;
position:absolute;
left:30%;
width:75px;
}
.cred {padding-top:15px;}
h1{text-align:center;text-shadow:3px 3px 5px #000;padding:55px;font-family: Verdana, Geneva, sans-serif;font-size:20pt;color:#D3A76F;}
#bybbn {
position:absolute;
right:5px;
font-size:10px;
color:#aaa;
padding:13px;
bottom:0px;
cursor:pointer;
}
#bybbn label {
display:none;
position:absolute;
top:-49px;
right:15px;
z-index:10000;
font-size:11px;
color:#a00;
padding:11px 3px;
text-align:center;
width:60px;
height:40px;
background-image:url('http://www.croppic.net/assets/img/jobotic_bubble.png');
background-repeat:no-repeat;
}
#bbntic {
position:fixed;
right:-100px;
bottom:-3px;
font-size:10px;
color:#aaa;
padding:13px;
z-index:9999;
}
JavaScript
$(document).ready(function(){
$('#bybbn').hover(function(){
$('#bbntic').animate({right:'75px'},600, function(){ $('#bybbn label').css('display','block'); });
},
function(){
$('#bybbn label').css('display','none').stop(true, true)
$('#bbntic').animate({right:'1900px'},1800, function(){ $('#bbntic').css('right','-100px').stop(true, true) })
});
$('#bybbn').click(function(){window.open('http://beben-koben.blogspot.com/','_blank');});
})