-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPage5.html
More file actions
34 lines (30 loc) · 1022 Bytes
/
Page5.html
File metadata and controls
34 lines (30 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<html>
<head>
<title>Image Hide Function</title>
<h1>Image hide function </h1>
</head>
<body>
<img id="img1" src="jquery-icon.png" alt="">
<input type="text" name="" id="" size="10">
<p>this is javascript programming with jQyery</p>
</body>
<script src="https://code.jquery.com/jquery-3.5.1.js"
integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc="
crossorigin="anonymous">
</script>
<script type="text/javascript" >
$(document).ready(function(){
//image is hide when this method is called after the click
$("#img1").click(function(){
console.log("image hidden")
$(this).hide();
})
//this we are using the on keyword and the paragraph hiddem funtion
//from this function we are hidding the paragrph when we are starting to typing
$("input").on("keypress",function(){
console.log("paragraph is hidden");
$("p:last").hide();
})
})
</script>
</html>