forked from amitmaindola/KrishiMitra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
99 lines (90 loc) · 2.44 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
89
90
91
92
93
94
95
96
97
98
99
/* const texts=["E","Ea","Eat","Eat","Ea","E","","C","Co","Cod","Code","Code","Cod","Co","C","","S","Sl","Sle","Slee","Sleep","Sleep","Slee","Sle","Sl","S","","R","Re","Rep","Repe","Repea","Repeat","Repeat","Repea","Repe","Rep","Re","R",""]; */
var text="";
const fullText1 = "Inhance Your Farming Business...";
const fullText2 = "Make Direct Contacts to Merchants and Farmers...";
const fullText3 = "Upload Your Own Products...";
const texts=[""];
for (let i = 1; i <= fullText1.length; i++) {
text=fullText1.slice(0,i);
texts.push(text);
}
for (let i = 0; i < 10; i++) {
texts.push(fullText1);
}
for (let i = fullText1.length; i >= 0; i=i-2) {
text=fullText1.slice(0,i);
texts.push(text);
}
for (let i = 1; i <= fullText2.length; i++) {
text=fullText2.slice(0,i);
texts.push(text);
}
for (let i = 0; i < 10; i++) {
texts.push(fullText2);
}
for (let i = fullText2.length; i >= 0; i=i-2) {
text=fullText2.slice(0,i);
texts.push(text);
}
for (let i = 1; i <= fullText3.length; i++) {
text=fullText3.slice(0,i);
texts.push(text);
}
for (let i = 0; i < 10; i++) {
texts.push(fullText3);
}
for (let i = fullText3.length; i >= 0; i=i-2) {
text=fullText3.slice(0,i);
texts.push(text);
}
var i=0,j=0, j2=0;
const arrayLen = texts.length;
function Screen() {
setInterval(function () {
if (i==arrayLen) {
i=0;
}
text = texts[i++];
document.getElementById("text").innerHTML=text;
},100)
setInterval(function(){
if(j==0){
document.getElementById("span").style.opacity=0;
}
if(j==1){
document.getElementById("span").style.opacity=0.25;
}
if(j==2){
document.getElementById("span").style.opacity=0.5;
}
if(j==3){
document.getElementById("span").style.opacity=1;
}
if(j==4){
document.getElementById("span").style.opacity=0.5;
}
if(j==5){
document.getElementById("span").style.opacity=0.25;
}
if (j==6) {
document.getElementById("span").style.opacity=0;
}
j++;
if (j==7) {
j=0;
}
},100);
}
setInterval(function(){
document.getElementById("span-2").style.opacity=j2/150;
j2++;
if (j2==150) {
j2=0;
}
},10);
Screen();
// FOR LOADER
function loaded(){
document.getElementById("loading").style.display = "none";
}
// registration button alert