下の文言に影響を与えずにロゴ画像を上に移動したいのですが、両方の要素が別の div にあり、親 div にラップされていてもトリガーされます。理解できません。余白と関係があると思いますが、テキスト要素に反対の値を逆に設定しようとすると、奇妙な動作が発生しました。
CSS:
.full-circle {
display:block;
margin:auto;
margin-top: 15px;
overflow: hidden;
height: 180px;
width: 180px;
border: 2px solid #FFF;
-moz-border-radius: 90px;
-webkit-border-radius: 90px;
background:#FDF5E6;
-webkit-transition: margin 0.2s ease-out;
-moz-transition: margin 0.2s ease-out;
-o-transition: margin 0.2s ease-out;
}
.full-circle:hover{margin-top: 2px;}
jQuery:
$('.full-circle').hover(
function(){
$(this).stop().animate(
{marginTop: '2'}, 20, 'linear'
);//end animate
},//end function
function(){
$(this).stop().animate(
{marginTop: '15'}, 20, 'linear'
);//end animate
}//end function
);//end hover