jquery mouseover/mouseout
- by Hulk
In the following code once the mouse out is done the mouse over again does not work ,what is the work around for this
<!DOCTYPE html>
<html>
<head>
<style>
/* div { background:#def3ca; margin:3px; width:80px;
display:none; float:left; text-align:center; }*/
</style>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body>
<div id="playControls" style="position:absolute; bottom:0px; left:0px; right:0px;color:blue;">
Mouse over me
</div>
<script>
$(document).ready(function() {
$("#playControls").mouseover(function () {
alert('here');
$("div:eq(0)").show("fast", function () {
/* use callee so don't have to name the function */
$(this).next("div").show("fast", arguments.callee);
});
});
$("#playControls").mouseout(function () {
alert('here');
$("div").hide(2000);
});
});
</script>
</body>
</html>