div に mouseenter エフェクトを適用しました。div に入ると、別の div がアニメーション化されます。問題は、mouseenter 効果が子 div にも適用されることです。親 div だけに効果を適用し、子 div をアニメーション化するにはどうすればよいですか?
JS:
$(document).ready(function() {
$('#slideleft').mouseenter(function() {
var $lefty = $(this).children();
$lefty.stop().animate({
left: "0px",
top: "0px"
}, 400 );
});
$('#slideleft').mouseleave(function() {
var $lefty = $(this).children();
$lefty.stop().animate({
left: "-700px",
top: "200px"
}, 400 );
});
});
HTML
<div id="slideleft" class="slide">
<div class="inner">Animate this element's left style property</div>
</div>
</div>