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>