-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.js
69 lines (54 loc) · 1.77 KB
/
app.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
$(function(){
var sheetUrl = 'https://spreadsheets.google.com/feeds/cells/1M-444B44qT78GDJH7MiGJ363FjVxA06-MmZVBqJ3IkQ/1/public/full?alt=json';
$.getJSON(sheetUrl, function(data){
var entry = data.feed.entry;
var name = []; // the leftmost column of the Google Sheets
var college = []; // second column
var phone_no = []; // third column
var technology=[]; //fourth column
var level=[]; //fifth column
var photo=[]; //sixth column
for (var i = 0; i < entry.length; i += 6){
// entry[i].content.$t retrieves the content of each cell
name.push(entry[i].content.$t);
college.push(entry[i+1].content.$t);
phone_no.push(entry[i+2].content.$t);
technology.push(entry[i+3].content.$t);
level.push(entry[i+4].content.$t);
photo.push(entry[i+5].content.$t);
}
console.log(name);
console.log(college);
console.log(phone_no);
console.log(technology);
console.log(level);
console.log(photo);
var name_json = { ...name};
var college_json = { ...college};
var phone_no_json = { ...phone_no};
var technology_json = { ...technology};
var level_json = { ...level};
var photo_json = { ...photo};
console.log(name_json);
console.log(college_json);
console.log(phone_no_json);
console.log(technology_json);
console.log(level_json);
console.log(photo_json);
})
});
// for (var i = 0; i < entry.length; i++) {
//
// }
var $message = 'Learn to Teach \n Teach to Learn'.split('').reverse();
// Set the frequency of your 'pops'
var $timeout = 200;
var outputSlowly = setInterval(function() {
// Add text to the target element
$('#home-gif').append($message.pop());
// No more characters - exit
if ($message.length === 0) {
clearInterval(outputSlowly);
}
}, $timeout);
// Getting data as Json from spreadsheet