-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.js
55 lines (50 loc) · 1.12 KB
/
Main.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
(function ($) {
// Navbar on scrolling
$(window).scroll(function () {
if ($(this).scrollTop() > 200) {
$('.navbar').fadeIn('slow').css('display', 'flex');
} else {
$('.navbar').fadeOut('slow').css('display', 'none');
}
});
})(jQuery);
function onHomeClick() {
var my_element = document.getElementById("about");
my_element.scrollIntoView({
behavior: "smooth",
block: "start",
inline: "nearest"
});
}
function onSkillClick() {
var my_element = document.getElementById("skill");
my_element.scrollIntoView({
behavior: "smooth",
block: "start",
inline: "nearest"
});
}
function onPortfolioClick() {
var my_element = document.getElementById("products");
my_element.scrollIntoView({
behavior: "smooth",
block: "start",
inline: "nearest"
});
}
function onContactClick() {
var my_element = document.getElementById("contact");
my_element.scrollIntoView({
behavior: "smooth",
block: "start",
inline: "nearest"
});
}
function onQualityClick() {
var my_element = document.getElementById("Achievements");
my_element.scrollIntoView({
behavior: "smooth",
block: "start",
inline: "nearest"
});
}