-
Notifications
You must be signed in to change notification settings - Fork 0
/
showAndHideDiv.html
34 lines (24 loc) · 949 Bytes
/
showAndHideDiv.html
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
<!--Write Javascript (JS) functions showDiv() and hideDiv(), that show
and hide a DIV element, respectively. Create appropriate CSS to style
links (<a>…</a>) so that they appear in red with a “hand” type cursor,
and without underlining. Create an HTML page with sample links that,
whenever the mouse hovers over the link, a DIV element containing a single
line of text appears to the right of the mouse pointer. Provide the
complete HTML, CSS and JS for this example, including the DIV element, button and their respective CSS styles.-->
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#button").click(function(){
$("#output").toggle();
});
});
</script>
</head>
<body>
<div id="output">check tahnwqnxn jwnxjnqwknxn </div><br>
<button type="button" id="button">Show/Hidde</button>
</body>
</html>