-
Notifications
You must be signed in to change notification settings - Fork 0
/
indexa.html
61 lines (50 loc) · 1.5 KB
/
indexa.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<html>
<head>
<title>Teste</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/ui-lightness/jquery-ui.css">
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
</head>
<body>
<form>
One<input id="1" type="name" name="name" class='moo'><br>
Two<input id="2" type="name" name="name" class='moo'><br>
Three<input id="3" type="name" name="else" class='moo'><br>
Four<input id="4" type="name" name="name" class='moo'><br>
Five<input id="5" type="name" name="name" class='moo'><b/>
</form>
<div id="progressbar" class="progressbar"></div>
<form>
<input type="checkbox">
</form>
<label id="ok">__</label>
<script>
$(document).ready(function(){
$("input[type='checkbox']").change(function() {
if(this.checked) {
$("body").toggleClass("blue");
}
else{
$("body").toggleClass("blue");$("#ok").show();
}
});
var x = 0;
$("#progressbar").progressbar({
value: x,
});
$(".moo").change(function() {
var pbVal = 0;
if ($("#1").val().length > 0) pbVal += 20;
if ($("#2").val().length > 0) pbVal += 20;
if ($("#3").val().length > 0) pbVal += 20;
if ($("#4").val().length > 0) pbVal += 20;
if ($("#5").val().length > 0) pbVal += 20;
$( "#progressbar" ).progressbar("option", "value", pbVal);
return false;
});
});
</script>
</body>
</html>