-
Notifications
You must be signed in to change notification settings - Fork 2
/
cfc.js
executable file
·94 lines (78 loc) · 2.51 KB
/
cfc.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
/**
* Created by DaisyCream on 2015/8/11.
*/
// var arrowUp = document.getElementById("arrowUp");
// var arrowDown = document.getElementById("arrowDown");
// var workAll = document.getElementById("workAll");
// var workCount = 0;//现在在第几个workWindow
// var workHeight = 260;//移动的长度
//
// arrowDown.onclick = function(){
// workCount++;
// if(workCount>3){
// workCount=3;
// return;
// }
// workAll.style.top = -(workCount*workHeight)+"px";
// }
//
//
// arrowUp.onclick = function workmoveup(){
// workCount--;
// if(workCount<0){
// workCount=0;
// return;
// }
// workAll.style.top = -(workCount*workHeight)+"px";
// }
/****************************WORKSHOW***************************/
WORKSHOW = function(){};
WORKSHOW.workShowOpenBtu = document.getElementById("workShowOpenBtu");
WORKSHOW.workShowScreen = document.getElementById("workShowScreen");
WORKSHOW.btuClickCount = 0;
WORKSHOW.workShowOpenBtu.onclick = function(){
WORKSHOW.btuClickCount++;
if(WORKSHOW.btuClickCount%2!=0) {
WORKSHOW.workShowScreen.className = "workShowScreenON";
WORKSHOW.workShowScreen.style.display = "block";
}
else{
WORKSHOW.workShowScreen.className = "workShowScreenOFF";
}
};
/***
* This is the add show
*/
WORKSHOW.workShowContent = document.getElementById("workShowContent");
WORKSHOW.workShowContentSingle = document.getElementsByClassName("workShowContentSingle");
WORKSHOW.workShowContentSingleCount = WORKSHOW.workShowContentSingle.length;
WORKSHOW.addShow = function(){
WORKSHOW.workShowContent.style.width = 600*WORKSHOW.workShowContentSingleCount+"px";
};
WORKSHOW.addShow();
/***
* This is the workShow picture set
*/
WORKSHOW.workShowPhoto = document.getElementsByClassName("workShowPhoto");
WORKSHOW.setPicture = function(){
for(var i=0;i<WORKSHOW.workShowPhoto.length;i++){
WORKSHOW.workShowPhoto[i].style.backgroundImage = "url(png/work"+(i+1)+".png)";
}
};
WORKSHOW.setPicture();
/***
* This is the workShow slide
*/
WORKSHOW.slideLong = 0;
$("#arrowLeft").click(function(){
if(WORKSHOW.slideLong<0){
WORKSHOW.slideLong++;
$("#workShowContent").animate({left:WORKSHOW.slideLong*600+"px"},1000);
}
});
$("#arrowRight").click(function(){
if(WORKSHOW.slideLong>-(WORKSHOW.workShowContentSingleCount-1)){
WORKSHOW.slideLong--;
$("#workShowContent").animate({left:WORKSHOW.slideLong*600+"px"},1000);
}
});