-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
50 lines (42 loc) · 1.09 KB
/
test.js
File metadata and controls
50 lines (42 loc) · 1.09 KB
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
var Body = {
setColor : function (color){
// document.querySelector('body').style.color = color;
$('body').css('color', color)
},
setBackgroundColor : function (color){
// document.querySelector('body').style.backgroundColor = color;
$('body').css('backgroundColor', color)
}
}
var Links = {
setColor : function (color){
// var alist = document.querySelectorAll('a')
// var i = 0
// while(i < alist.length){
// console.log(alist[i]);
// alist[i].style.color = color;
// i += 1;
// }
$('a').css('color',color);
}
}
// function LinksSetColor(color){
// }
// function BodySetColor(color){
// }
// function BodySetBackgroundColor(color){
// }
function nightday_handler(self){
if(self.value === 'night'){
Body.setBackgroundColor('black')
Body.setColor('White')
self.value = 'day'
Links.setColor('powderblue')
}
else{
Body.setBackgroundColor('white')
Body.setColor('black')
self.value = 'night'
Links.setColor('blue')
}
}