When the mouse pointer enters the <span> element, hide it. - Javascript jQuery

Javascript examples for jQuery:Mouse Event

Description

When the mouse pointer enters the <span> element, hide it.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("span").mouseenter(function(){
        $(this).hide();/*from www. j ava2 s  . c  om*/
    });
});
</script>
</head>
<body>

<span>If you mouse over me, I will disappear.</span><br>
<span>If you mouse over me, I will disappear.</span>

</body>
</html>

Related Tutorials