I have applied an mouseenter effect to a div. When you enter the div, it then animates another div. The problem is, the mouseenter effect applies to the children div as well. How do I apply the effect to just the parent div, but animate the children 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>