Hide paragraph using mouse enter function – jquery

Hide paragraph using mouse enter function – jquery

 

Make the document ready. Though it is not necessary but good practice

$(document).ready(function(){});

 

Using mouseenter function

$(".myPara").mouseenter(function(){});

 

Using hide function in jquery

$(".myPara").hide();

 

<html>
<head>
<title> Here is my title </title>
<script src="jquery-3.6.0.min.js"> </script>
<link rel="stylesheet" href="bootstrap.min.css">
</head>
<body>
<p class="myPara">Here is my paragraph</p>
<script>
$(document).ready(function(){
$(".myPara").mouseenter(function(){
$(".myPara").hide();
});
});
</script>
</body>
</html>
Tony BB
 

TonyBB is a Coach , marketer, hypnotist and a founder of RSKVF Production who specializes in providing simple, affordable, and easy to use solutions for Life.

Click Here to Leave a Comment Below 0 comments

Leave a Reply: