-
Notifications
You must be signed in to change notification settings - Fork 0
/
homeLUKE.html
92 lines (76 loc) · 2.44 KB
/
homeLUKE.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Budjit</title>
<link rel="stylesheet" type="text/css" href="budjitLUKE.css"/>
</head>
<body>
<p>
<span>
<input type="text" id="budgetInput" class="budgetInput" value="1000" placeholder="BUDGET">
<button type="button" class="button" onclick="budgetMax()">Set Budget</button>
</span>
<span>
<div id="slidecontainer">
<input type="range" min="0" max="1000" value="50%" class="slider" id="myRange" oninput="budgetValue(this.value);" step="10">
</div>
</span>
</p>
<span>
<label for="budgetLeft">Travel</label>
<input class="budgets" id="budgetLeft" value="£500">
</span>
<span>
<label for="budgetRight">Accommodation</label>
<input class="budgets" id="budgetRight" value="£500">
</span>
<p>
<span>
<input id="fromBox" placeholder="FROM">
<input id="toBox" placeholder="TO">
</span>
<span>
<input id="nightsBox" placeholder="NIGHTS">
</span>
</p>
<p>
<span>
<button type="button" id="button" class="button" onclick="window.location.href='results.html'">Budjit!</button>
</span>
</p>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
<script type="text/javascript">
function budgetValue(val) {
document.getElementById("budgetLeft").value="£" + val;
document.getElementById("budgetRight").value="£" + (document.getElementById("myRange").max-val);
}
function budgetMax() {
var maxBudget = document.getElementById("budgetInput").value;
var x = document.getElementById("myRange").max = maxBudget;
document.getElementById("budgetLeft").value="£" + document.getElementById("myRange").value;
document.getElementById("budgetRight").value="£" + (x-document.getElementById("myRange").value);
}
</script>
<script>
$(function() {
var availableTags = [
"Cardiff",
"London",
"Reading",
"Portsmouth",
"Liverpool",
"Manchester"
];
$("#fromBox").autocomplete({
source: availableTags
});
$("#toBox").autocomplete({
source: availableTags
});
} );
</script>
</body>
</html>