jquery hide h1 heading

jquery hide h1 heading

Ready the document first to perform jquery operations.

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

Use click function to do any task.

$(".head1").click(function(){});

hide the specified h1, p, button, class , id etc

$(".head1").hide();

 

<html>
<head>
<title> Here is my title </title>

<script src="jquery-3.6.0.min.js"> </script>
</head>
<body>
<h1 class="head1"> here is my h1</h1>
<script>
$(document).ready(function(){

$(".head1").click(function(){

$(".head1").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: