forked from java-course-ee/java-course-ee
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
57 lines (54 loc) · 1.55 KB
/
index.html
File metadata and controls
57 lines (54 loc) · 1.55 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
52
53
54
55
56
57
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.1.js"></script>
<style type="text/css">
</style>
<script type="text/javascript">
$(function(){
// $('#add').click(function(){
// child = $('<p>This is a text of paragraph</p>');
// $('#container').append(child);
// });
//
// $('#add').click(function(){
// child = $('<p>This is a text of paragraph</p>').hide();
// $('#container').append(child);
// child.fadeIn(200);
// });
//
// $('#add').click(function(){
// child = $('<p>This is a text of paragraph</p>').hide();
// $('#container').append(child);
// child.fadeIn(3000, function(){
// var currCount = $('#count').text();
// currCount++;
// $('#count').text(currCount);
// });
// });
//
$('#add').click(function(){
child = $('<p>This is a text of paragraph</p>').hide();
$('#container').append(child);
child.fadeIn(200, function(){
var count = $('#count');
var currCount = count.text();
currCount++;
count.fadeOut(200, function(){
count.text(currCount);
count.fadeIn(200);
});
});
});
})
</script>
</head>
<body>
<button id="add">add a paragraph</button>
Добавлено <span id="count">0</span> параграфов
<div id="container">
</div>
</body>
</html>