-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathdemos.html
39 lines (34 loc) · 832 Bytes
/
demos.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
35
36
37
38
39
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Populate Demos</title>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script src="./jquery.populate.js"></script>
</head>
<body>
<form id="form-1">
<div>
<label for="name"/>Name</label>
<input id="name" name="name" type="text"/>
</div>
<div>
<label>
<input type="checkbox" name="alive" id="alive" /> Are you alive?
</label>
</div>
</form>
<button id="populate">Populate</button>
<script>
$(function(){
$('#populate').on('click', function(e) {
$('#form-1').populate({
name: 'Peter Pan',
alive: "on"
});
});
});
</script>
</body>
</html>