-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathhide-n-seek.html
More file actions
51 lines (50 loc) · 1.54 KB
/
hide-n-seek.html
File metadata and controls
51 lines (50 loc) · 1.54 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Hide n Seek</title>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
$(function(){
$('#trigger').on('click', function() {
// $('.content').fadeOut();
$('.target').animate({
opacity: 0,
height: 0,
left: 150,
top: -100
}, 1500, function() {
$(this).hide();
})
})
})
</script>
<style>
.target {
position: relative;
width: 500px;
height: 200px;
}
.target p {
padding: 0;
margin: 0;
}
</style>
</head>
<body>
<h3>Some Header</h3>
<div class="target">
<div class="content">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto consectetur dignissimos eveniet nesciunt
temporibus! Enim eum excepturi itaque laboriosam maxime odit praesentium? Assumenda, autem esse illo magnam
recusandae reprehenderit sed.</p>
<p>Ab alias asperiores beatae blanditiis consequatur cupiditate ducimus eius eligendi error eveniet, iure
laboriosam
laborum magnam, magni necessitatibus neque optio possimus quam quidem rerum sunt voluptas voluptates?
Aliquam,
doloribus, perspiciatis!</p>
</div>
</div>
<input type="button" value="click me!" id="trigger"/>
</body>
</html>