-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
94 lines (82 loc) · 2.41 KB
/
index.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html>
<head>
<title>Radio</title>
<style type="text/css">
.radio-toolbar {
margin: 10px;
}
.radio-toolbar input[type="radio"] {
opacity: 0;
position: fixed;
width: 0;
}
.radio-toolbar label {
display: inline-block;
background-color: #fff;
padding: 10px 20px;
font-family: sans-serif, Arial;
font-size: 16px;
border: 2px solid #F47056;
border-radius: 15px;
}
.radio-toolbar label:hover {
background-color: #F47056;
color: #fff;
}
.radio-toolbar input[type="radio"]:focus + label {
background-color: #F47056;
color: #fff;
}
.radio-toolbar input[type="radio"]:checked + label {
background-color: #F47056;
color: #fff;
}
</style>
</head>
<body>
<form class="radio-toolbar">
<p>How Many Practices</p>
<input id="1" type="radio" name="practices" value="299">
<label for="1">1</label>
<input id="2" type="radio" name="practices" value="538.2">
<label for="2">2</label>
<input id="3" type="radio" name="practices" value="762.45">
<label for="3">3</label>
<input id="4" type="radio" name="practices" value="956.8">
<label for="4">4</label>
<p>How Many Total Users</p>
<input id="1-5" type="radio" name="users" value="600">
<label for="1-5">1-5</label>
<input id="6-10" type="radio" name="users" value="1020">
<label for="6-10">6-10</label>
<input id="11-20" type="radio" name="users" value="1800">
<label for="11-20" >11-20</label>
<input id="20-50" type="radio" name="users" value="3600">
<label for="20-50">20-50</label>
<p>Per Day</p>
<span id="per_day">$ 0</span> <br>
<p>Monthly</p>
<span id="monthly">$ 0</span>
</form>
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script type="text/javascript">
$(document).ready(function(){
$("input[name='practices'], input[name='users']").change(function(){
var practices = parseFloat($("input[name='practices']:checked").val());
var users = parseFloat($("input[name='users']:checked").val());
if(isNaN(practices)){
practices = 0;
}
if(isNaN(users)){
users = 0;
}
var per_day = (practices + users) / 365;
var monthly = (practices + users) / 12;
$("#per_day").text("$ "+per_day.toFixed(2));
$("#monthly").text("$ "+monthly.toFixed(2));
});
});
</script>
</body>
</html>