How to show or hide a social sharing buttons div on mouseover using jquery -


i trying work out how show hidden shearing (facebook, google+, twitter) divs when hovering on 1 div.

take example animation of sharing round div on top right side : http://www.gethyapp.com/

please see have done : http://goo.gl/6xdm8
here have done in code:

html

<div class="share">share     <div class="line"></div>     <div class="facebook">fb</div>     <div class="google-plus">g+</div>     <div class="twitter">t</div> </div> 

css

.share{     background-color: #da251d;     width: 50px;     height: 50px;     -webkit-border-radius: 50%;     -moz-border-radius: 50%;     border-radius: 50%;     position: relative; } .share .facebook, .share .google-plus, .share .twitter, .share .line {     display:none; } .facebook{     background-color: #ffff00;     width: 0px;     height: 0px;     -webkit-border-radius: 50%;     -moz-border-radius: 50%;     border-radius: 50%;     opacity: 0;  } .google-plus{     background-color: #ffff00;     width: 0px;     height: 0px;     -webkit-border-radius: 50%;     -moz-border-radius: 50%;     border-radius: 50%;     opacity: 0;  } .twitter{     background-color: #ffff00;     width: 0px;     height: 0px;     -webkit-border-radius: 50%;     -moz-border-radius: 50%;     border-radius: 50%;     opacity: 0;  } .line{     width: 1px;     height: 200px;     background-color: #000;     position: absolute;     left: 30px; } 

js

$(function(){     $(".share").hover(function(){         $(this).find(".line").delay(50).fadein().animate({width: 1, height: 200, opacity: 1, top:10},200);         $(this).find(".facebook").delay(100).fadein().animate({width: 32, height: 32, opacity: 1},400);         $(this).find(".google-plus").delay(300).fadein().animate({width: 32, height: 32, opacity: 1},400);         $(this).find(".twitter").delay(500).fadein().animate({width: 32, height: 32, opacity: 1},400);     }, function(){           $(this).find(".line").delay(50).fadein().animate({width: 1, height: 0, opacity: 0, top:-10},200)           $(this).find(".facebook").delay(500).animate({width: 0, height: 0, opacity: 0},400);           $(this).find(".google-plus").delay(300).animate({width: 0, height: 0, opacity: 0},400);           $(this).find(".twitter").delay(100).animate({width: 0, height: 0, opacity: 0},400);     }); }); 

how can make when hover on share box shearing box appears next it?

i visited site mentioned. reference site have taken code doing animation

 <style type="text/css">     #share     {         display: none;         position: absolute;         right: 65px;         top: 20px;         line-height: 46px;         padding-right: 59px;     }     #share .list     {         position: absolute;         top: 0;         right: 0;         background: transparent;     }     #share .list strong, #share .list     {         position: relative;         display: block;         width: 46px;         height: 46px;         font-size: 30px;         font-weight: normal;         text-align: center;         -webkit-border-radius: 23px;         -moz-border-radius: 23px;         border-radius: 23px;         background: #fff;         color: #3fbad8;         margin: 0 0 6px;         font-family: 'icomoon';     }     #share .list strong     {         cursor: default;     }     .ie9 #share .list strong     {         padding-top: 5px;         height: 41px;     }     #share .list strong span     {         position: absolute;         top: 100%;         left: 50%;         width: 1px;         height: 0;         background: #fff;         -webkit-transition: height .0001s linear;         -moz-transition: height .0001s linear;         -ms-transition: height .0001s linear;         -o-transition: height .0001s linear;         transition: height .0001s linear;         opacity: 0;         filter: progid:dximagetransform.microsoft.alpha(opacity=0);     }     #share .list     {         background: #ff3;         color: #000;         -webkit-transition: -webkit-transform .0001s linear, background .0001s ease, color .0001s ease;         -moz-transition: -moz-transform .0001s linear, background .0001s ease, color .0001s ease;         -ms-transition: -ms-transform .0001s linear, background .0001s ease, color .0001s ease;         -o-transition: -o-transform .0001s linear, background .0001s ease, color .0001s ease;         transition: transform .0001s linear,background .0001s ease,color .0001s ease;         -webkit-transform: scale(0) translate3d(0,0,0);         -moz-transform: scale(0) translate3d(0,0,0);         -ms-transform: scale(0) translate3d(0,0,0);         -o-transform: scale(0) translate3d(0,0,0);         transform: scale(0) translate3d(0,0,0);         opacity: 0;         filter: progid:dximagetransform.microsoft.alpha(opacity=0);     }     #share .list a:hover     {         background: #000;         color: #fff;         text-decoration: none;     }     #share .list .tw     {         font-size: 18px;     }     #share .list .fb     {         font-size: 32px;     }     #share .list .gp     {         font-size: 32px;     }     #share .list:hover strong span, #share .list.hover strong span     {         height: 135px;         opacity: 1;         filter: progid:dximagetransform.microsoft.alpha(opacity=100);         -webkit-transition-duration: .3s;         -moz-transition-duration: .3s;         -ms-transition-duration: .3s;         -o-transition-duration: .3s;         transition-duration: .3s;     }     #share .list:hover a, #share .list.hover     {         -webkit-transform: scale(1) translate3d(0,0,0);         -moz-transform: scale(1) translate3d(0,0,0);         -ms-transform: scale(1) translate3d(0,0,0);         -o-transform: scale(1) translate3d(0,0,0);         transform: scale(1) translate3d(0,0,0);         opacity: 1;         filter: progid:dximagetransform.microsoft.alpha(opacity=100);         -webkit-transition-duration: .3s,.4s,.4s;         -moz-transition-duration: .3s,.4s,.4s;         -ms-transition-duration: .3s,.4s,.4s;         -o-transition-duration: .3s,.4s,.4s;         transition-duration: .3s,.4s,.4s;     }     #share .list:hover .tw, #share .list.hover .tw     {         -webkit-transition-delay: .1s,.0001s,.0001s;         -moz-transition-delay: .1s,.0001s,.0001s;         -ms-transition-delay: .1s,.0001s,.0001s;         -o-transition-delay: .1s,.0001s,.0001s;         transition-delay: .1s,.0001s,.0001s;     }     #share .list:hover .fb, #share .list.hover .fb     {         -webkit-transition-delay: .2s,.0001s,.0001s;         -moz-transition-delay: .2s,.0001s,.0001s;         -ms-transition-delay: .2s,.0001s,.0001s;         -o-transition-delay: .2s,.0001s,.0001s;         transition-delay: .2s,.0001s,.0001s;     }     #share .list:hover .gp, #share .list.hover .gp     {         -webkit-transition-delay: .3s,.0001s,.0001s;         -moz-transition-delay: .3s,.0001s,.0001s;         -ms-transition-delay: .3s,.0001s,.0001s;         -o-transition-delay: .3s,.0001s,.0001s;         transition-delay: .3s,.0001s,.0001s;     } </style>  <p id="share" style="opacity: 1; display: block;">     want solution <span class="list"><strong>?? <span></span>     </strong><a class="tw">twr</a> <a class="fb">fb</a> <a class="gp">g+</a> </span> </p> 

this same animation in site except logo of brand/site. same code in link.

please have once , hope want.

thanks prashant


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -