-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.html
More file actions
84 lines (70 loc) · 2.09 KB
/
test.html
File metadata and controls
84 lines (70 loc) · 2.09 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>jQuery SubmitLock Plugin Testing</title>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="jquery.submitlock.js"></script>
<script>
$(document).ready(function() {
// Rig it so inputbuttons are capable of submitting forms.
$('input[type=button]').click(function() {
$(this).parent().submit();
});
// Stub out the forms so we don't actually go anywhere.
$('form').submit(function() {
console.log('submit ' + $(this).attr('id'));
return false;
});
$('form').submitLock();
$('form.catch-locked').on('locked', function(event) {
console.log('locked ' + $(this).attr('id'));
});
});
</script>
<style type="text/css">
form {
margin-bottom: 2em;
}
.submitLockDisabled {
color: red;
font-weight: bold;
}
</style>
</head>
<body>
<form id="form_one">
<input type="submit" value="One: Submit" />
</form>
<form id="form_two">
<input type="submit" value="Two: Submit1" />
<input type="submit" value="Two: Submit2" />
</form>
<form id="form_three">
<input type="button" value="Three: InputButton" />
</form>
<form id="form_four">
<input type="button" value="Four: InputButton" />
<input type="submit" value="Four: Submit" />
</form>
<form id="form_five">
<button>Five: Button</button>
</form>
<form id="form_six">
<button>Six: Button</button>
<input type="submit" value="Six: Submit" />
</form>
<form id="form_seven">
<button>Seven: Button</button>
<input type="button" value="Seven: InputButton" />
<input type="submit" value="Seven: Submit" />
</form>
<form id="form_eight">
<a href="#somewhere"><button>Eight: A-Button</button></a>
<input type="submit" value="Eight: Submit" />
</form>
<form id="form_nine" class="catch-locked">
<input type="submit" value="Nine: Submit" />
</form>
</body>
</html>