-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
88 lines (77 loc) · 1.71 KB
/
index.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
let left1 = 0;
let left2 = 0;
let left3 = 0;
let right1 = 0;
let right2 = 0;
let right3 = 0;
$("#left-1").click(function() {
if(left1){
$("#left-1").css("background-color", "#888");
left1 = 0;
}
else{
$("#left-1").css("background-color", "#fff");
left1 = 1;
}
});
$("#left-2").click(function() {
if(left2){
$("#left-2").css("background-color", "#888");
left2 = 0;
}
else{
$("#left-2").css("background-color", "#fff");
left2 = 1;
}
});
$("#left-3").click(function() {
if(left3){
$("#left-3").css("background-color", "#888");
left3 = 0;
}
else{
$("#left-3").css("background-color", "#fff");
left3 = 1;
}
});
$("#right-1").click(function() {
if(right1){
$("#right-1").css("background-color", "#888");
right1 = 0;
}
else{
$("#right-1").css("background-color", "#EF233C");
right1 = 1;
}
});
$("#right-2").click(function() {
if(right2){
$("#right-2").css("background-color", "#888");
right2 = 0;
}
else{
$("#right-2").css("background-color", "#EF233C");
right2 = 1;
}
});
$("#right-3").click(function() {
if(right3){
$("#right-3").css("background-color", "#888");
right3 = 0;
}
else{
$("#right-3").css("background-color", "#EF233C");
right3 = 1;
}
});
//Editable
$(".team-name").editable();
$( "html" ).keypress(function( event ) {
if ( event.code == "IntlBackslash" ) {
event.preventDefault();
var txt1 = $('#team-l').html();
var txt2 = $('#team-r').html();
$('#team-l').html(txt2);
$('#team-r').html(txt1);
}
});