-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patholdcode
More file actions
47 lines (45 loc) · 795 Bytes
/
oldcode
File metadata and controls
47 lines (45 loc) · 795 Bytes
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
// old css
.ship{
width: 50px;
height: 50px;
border-radius:50% 50% 0 0;
color:black;
line-height: 50px;
text-align:center;
position:absolute;
margin-left: -25px;
margin-top: -25px
font-family:'Lato', sans-serif;
}
#0 {
background-color: blue;
}
#1 {
background-color: green;
}
#2 {
background-color: orange;
}
#3 {
background-color: yellow;
}
// old js
socket.on('names', function (names) {
for (var k = ships.length; k<names.length; k++) {
if (k== myNum) continue;
$('#view').append('<div class="ship" id = "' + k + '">' + names[k] + '</div>');
}
ships = names;
$('#0').css({
'background-color':'blue'
});
$('#1').css({
'background-color':'green'
});
$('#2').css({
'background-color':'orange'
});
$('#3').css({
'background-color':'red'
});
});