-
Notifications
You must be signed in to change notification settings - Fork 3
/
javascript.js
130 lines (103 loc) · 4.82 KB
/
javascript.js
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
function randomTop() {
var select = document.getElementById('topStyle');
var items = select.getElementsByTagName('option');
var index = Math.floor(Math.random() * items.length);
select.selectedIndex = index;
topDisplay();
}
function randomNeck() {
var select = document.getElementById('neckStyle');
var items = select.getElementsByTagName('option');
var index = Math.floor(Math.random() * items.length);
select.selectedIndex = index;
neckDisplay();
}
function randomSleeve() {
var select = document.getElementById('sleeveStyle');
var items = select.getElementsByTagName('option');
var index = Math.floor(Math.random() * items.length);
select.selectedIndex = index;
sleeveDisplay();
}
function randomBottom() {
var select = document.getElementById('bottomStyle');
var items = select.getElementsByTagName('option');
var index = Math.floor(Math.random() * items.length);
select.selectedIndex = index;
bottomDisplay();
}
function randomShoe() {
var select = document.getElementById('shoeStyle');
var items = select.getElementsByTagName('option');
var index = Math.floor(Math.random() * items.length);
select.selectedIndex = index;
shoeDisplay();
}
function topDisplay() {
var x = document.getElementById("topStyle").value;
document.getElementById("top").innerHTML = "<img src=\"" + x + "\">";
}
function neckDisplay() {
var x = document.getElementById("neckStyle").value;
document.getElementById("neckline").innerHTML = "<img src=\"" + x + "\">";
}
function sleeveDisplay() {
var x = document.getElementById("sleeveStyle").value;
document.getElementById("sleeves").innerHTML = "<img src=\"" + x + "\">";
}
function bottomDisplay() {
var x = document.getElementById("bottomStyle").value;
document.getElementById("bottomImage").innerHTML = "<img src=\"" + x + "\">";
}
function shoeDisplay() {
var x = document.getElementById("shoeStyle").value;
document.getElementById("shoeImage").innerHTML = "<img src=\"" + x + "\">";
document.getElementById("shoeImage2").innerHTML = "<img src=\"" + x + "\">";
}
function randomAll(){
randomNeck();
randomTop();
randomSleeve();
randomBottom();
randomShoe();
}
function yellow() {
document.getElementById("top").style.filter = "sepia(200%) saturate(100%) hue-rotate(0deg)";
document.getElementById("neckline").style.filter = "sepia(200%) saturate(100%) hue-rotate(0deg)";
document.getElementById("sleeves").style.filter = "sepia(200%) saturate(100%) hue-rotate(0deg)";
}
function green() {
document.getElementById("top").style.filter = "sepia(200%) saturate(100%) hue-rotate(40deg)";
document.getElementById("neckline").style.filter = "sepia(200%) saturate(100%) hue-rotate(40deg)";
document.getElementById("sleeves").style.filter = "sepia(200%) saturate(100%) hue-rotate(40deg)";
}
function cyan() {
document.getElementById("top").style.filter = "sepia(200%) saturate(100%) hue-rotate(100deg)";
document.getElementById("neckline").style.filter = "sepia(200%) saturate(100%) hue-rotate(100deg)";
document.getElementById("sleeves").style.filter = "sepia(200%) saturate(100%) hue-rotate(100deg)";
}
function blue() {
document.getElementById("top").style.filter = "sepia(200%) saturate(160%) hue-rotate(160deg) brightness(80%) contrast(90%)";
document.getElementById("neckline").style.filter = "sepia(200%) saturate(160%) hue-rotate(160deg) brightness(80%) contrast(90%)";
document.getElementById("sleeves").style.filter = "sepia(200%) saturate(160%) hue-rotate(160deg) brightness(80%) contrast(90%)";
}
function purple() {
document.getElementById("top").style.filter = "sepia(200%) saturate(100%) hue-rotate(230deg) brightness(80%) contrast(90%)";
document.getElementById("neckline").style.filter = "sepia(200%) saturate(100%) hue-rotate(230deg) brightness(80%) contrast(90%)";
document.getElementById("sleeves").style.filter = "sepia(200%) saturate(100%) hue-rotate(230deg) brightness(80%) contrast(90%)";
}
function red() {
document.getElementById("top").style.filter = "sepia(180%) saturate(200%) hue-rotate(300deg)";
document.getElementById("neckline").style.filter = "sepia(180%) saturate(200%) hue-rotate(300deg)";
document.getElementById("sleeves").style.filter = "sepia(180%) saturate(200%) hue-rotate(300deg)";
}
function orange() {
document.getElementById("top").style.filter = "sepia(200%) saturate(180%) hue-rotate(330deg)";
document.getElementById("neckline").style.filter = "sepia(200%) saturate(180%) hue-rotate(330deg)";
document.getElementById("sleeves").style.filter = "sepia(200%) saturate(180%) hue-rotate(330deg)";
}
function gray() {
document.getElementById("top").style.filter = "";
document.getElementById("neckline").style.filter = "";
document.getElementById("sleeves").style.filter = "";
}