-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtop.php
More file actions
112 lines (95 loc) · 3.31 KB
/
top.php
File metadata and controls
112 lines (95 loc) · 3.31 KB
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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="css/custom.css">
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="assets/fonts/awesome/css/all.css">
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
$(document).ready(function(){
$('.collapse').on('show.bs.collapse', function () {
$('.collapse.show').each(function(){
$(this).collapse('hide');
});
});
});
</script>
<!--animaçâo do scroll-->
<script>
var root = document.documentElement;
root.className += ' js';
function boxTop(idBox) {
var boxOffset = $(idBox).offset().top;
return boxOffset;
}
//PROGRESSO
$(document).ready(function() {
var $target = $('.progress-bar'),
animationClass = 'anime-init-progress',
windowHeight = $(window).height(),
offset = windowHeight - (windowHeight / 12);
function animeScroll() {
var documentTop = $(document).scrollTop();
$target.each(function() {
if (documentTop > boxTop(this) - offset) {
$(this).addClass(animationClass);
$(this.$target1).addClass(animationClass)
} else {
$(this).removeClass(animationClass);
}
});
}
animeScroll();
$(document).scroll(function() {
animeScroll();
});
});
//outras animações
$(document).ready(function() {
var $target = $('.ani'),
animationClass = 'anime-init-outer',
windowHeight = $(window).height(),
offset = windowHeight - (windowHeight / 12);
function animeScroll() {
var documentTop = $(document).scrollTop();
$target.each(function() {
if (documentTop > boxTop(this) - offset) {
$(this).addClass(animationClass);
$(this.$target1).addClass(animationClass)
} else {
$(this).removeClass(animationClass);
}
});
}
animeScroll();
$(document).scroll(function() {
animeScroll();
});
});
</script>
<!--menu sobreposto-->
<script>
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll >= 40) { // se rolar 40px ativa o evento
$("#nav").addClass("fixed-top"); //coloca a classe "ativo" no id=menu
} else {
$("#nav").removeClass("fixed-top"); //se for menor que 40px retira a classe "ativo" do id=menu
}
});
</script>
</head>
<body class="text-center">
<header>
<nav class="nav " id="nav">
<h3 class="col-md-6" id="nav-name">Moises Cardozo de Paula</h3>
<div class="nav nav-masthead justify-content-center">
<a class="nav-link active" href="#containerAbout"> sobre mim </a>
<a class="nav-link" href="#fomação">Formação</a>
<a class="nav-link" href="#Experiencia">Experiencia</a>
</div>
</nav>
</header>