// CSS
#popupUser{width:180px; height:180px; position:absolute; background:#FFFFFF; border:#000000 2px solid; display:none;}
.viewUser{width:173px; float:left; padding:10px; margin-left:20px; margin-bottom:20px; border:#000000 1px solid;}
// HTML + Jquery
<body>
<div class="contenitore">
<script type="text/javascript">
$(document).ready(function() {
$(".viewUser")
.mousemove(function (e) {
if($("#popupUser").css('display')=='none') {
$("#popupUser").css({left:e.pageX+15, top:e.pageY -190}).show();
alert("None");
}
})
.mouseout(function () {
$("#popupUser").hide();
});
});
</script>
<div class="viewUser">
Content
</div>
</div>
<div id="popupUser"> </div>
</body>
What I would like to consider is that when I am in the viewUser div with the mouse, a warning appears (no print). After that, until I leave this div, I should never see another warning (because the display property, when I call the .show () function, should be set as a block).
But this does not happen: actually for a while (when I am still moving around viewUser with the mouse), I see a warning. Why is this behavior?
Greetings
UPDATE
, , : div viewUser, ajax- , popupUser. , ajax , div:)