Hiding paragraph using mouse leave function – jquery

Hiding paragraph using mouse leave function – jquery

 

To demonstrate this example we are using paragraph with “myPara” id

<p id="myPara">Nothing here in this paragraph.</p>

 

Wait for the document to get ready for jquery

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

 

Using mouse up function in Jquery

$("#myPara").mouseup(function(){});

 

Using mouse down function in Jquery

$("#myPara").mousedown(function(){});

 

Using mouse leave function in Jquery

$("#myPara").mouseleave(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 id="myPara">Nothing here in this paragraph.</p>
<script>
$(document).ready(function(){
$("#myPara").mouseleave(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: