-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
120 lines (104 loc) · 2.1 KB
/
script.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
$(
function(){
$("#starting").click(
function(){
$("#hideText").slideDown('slow',function(){});
}
);
//for navigation bar
$(".nav").css({
"background-color":"#4682b4",
"color":"black"
});
$(".nav li").css({
"border":"0"
});
$(".nav li a").css({
"color":"white"
});
$(window).scroll(function(){
if($(".nav").offset().top===0)
{
$(".nav").css({
"background-color":"#4682b4",
"color":"white"
});
$(".nav li").css({
"border":"0"
});
$(".nav li a").css({
"color":"white"
});
return;
}
$(".nav").css({
"background-color":"#8b0a50",
"color":"#ffd700"
});
$(".nav li").css({
"border":""
});
$(".nav li a").css({
"color":"#ffd700"
});
});
//end of navigation bar
$(".start_image1").hide().fadeIn(2000);
$(".start_message").hide().slideDown(2000);
// $(".start_message").slideDown(2000,function(){});
$(".button,a.justLink").hide().fadeIn(2000);
$(".nav li a,.justLink").click(function(event){
if($(this).hash!=="")
{
event.preventDefault();
var hash=this.hash;
$('html,body').animate({
scrollTop: $(hash).offset().top
},800,function(){
window.location.hash=hash;
}
);
}
});
//////////////////////////////////////////
/*random gilberish*/
var flag=0;
$(".para1").hide();
var flag2=0;
$(".para2").hide();
$(document).scroll(function(){
var x=$(document).scrollTop();
var y=$("#about").offset().top;
if(y<=x+100&&y>=x-50)
{
if(flag==0)
{
$(".para1").slideDown('slow');
$(".heading:eq(0)").hide().fadeIn(1000);
}
flag++;
}
else if(y>=x+550||y<=x-650){
$(".para1").hide();
flag=0;
}
/////////////////////////////////////
x=$(document).scrollTop();
y=$("#course").offset().top;
if(y<=x+100&&y>=x-50)
{
if(flag2==0)
{
$(".para2").slideDown('slow');
$(".heading:eq(1)").hide().fadeIn(1000);
}
flag2++;
}
else if(y>=x+550||y<=x-600){
$(".para2").hide();
flag2=0;
}
/////////////////////////////////////
});
}
);