-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainV11.js
64 lines (59 loc) · 2.43 KB
/
mainV11.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
var time;
window.addEventListener('load', function(){
var allimages = document.getElementsByTagName('img');
var iframes = document.getElementsByTagName('iframe');
for (var i=0; i<allimages.length; i++) {
if (allimages[i].getAttribute('data-src')) {
allimages[i].setAttribute('src', allimages[i].getAttribute('data-src'));
}
}
for (var i=0; i<iframes.length; i++) {
if (iframes[i].getAttribute('data-src')) {
iframes[i].setAttribute('src', iframes[i].getAttribute('data-src'));
}
}
}, false)
function size() {
if (window.innerWidth < 992) {
document.getElementById('spartyhead1').style.display = 'none';
document.getElementById('spartyhead2').style.display = 'none';
document.getElementById('twit2').style.display = 'none';
document.getElementById('insta2').style.display = 'none';
document.getElementById('fb2').style.display = 'none';
document.getElementById('twit1').style.display = 'inline';
document.getElementById('fb1').style.display = 'inline';
document.getElementById('insta1').style.display = 'inline';
} else {
document.getElementById('spartyhead1').style.display = 'inline';
document.getElementById('spartyhead2').style.display = 'inline';
document.getElementById('twit2').style.display = 'inline';
document.getElementById('fb2').style.display = 'inline';
document.getElementById('insta2').style.display = 'inline';
document.getElementById('twit1').style.display = 'none';
document.getElementById('insta1').style.display = 'none';
document.getElementById('fb1').style.display = 'none';
}
}
$(window).on('load', function () {
document.getElementById('loader').style.display = 'none';
document.getElementById('content').style.display = 'block';
var count = 0
var formal = setInterval(function() {
count++
if (count > 10)
{
clearInterval(formal)
}
var color = getRandomColor();
document.getElementById('formal').style.color = color;
document.getElementById('formal').style.textShadow = "0 0 20px" + color;
}, 500);
});
function getRandomColor() {
var letters = '0123456789ABCDEF';
var color = '#';
for (var i = 0; i < 6; i++ ) {
color += letters[Math.floor(Math.random() * 16)];
}
return color;
}