-
Notifications
You must be signed in to change notification settings - Fork 0
/
scripts.js
57 lines (54 loc) · 1.35 KB
/
scripts.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
/*
$(document).ready(function(){
$("a").on('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;
});
}
});
});
*/
var preloader = document.getElementById('loader');
function homePage(){
preloader.style.display = 'none';
}
//Anchors
$(function(){
$('a[href^="#"]').click(function(){
var target = $(this).attr('href');
$('html, body').animate({scrollTop: $(target).offset().top - 50}, 800);
return false;
});
});
$('.skill').waypoint({
handler: function () {
$(".skill_level").each(function () {
$(this).animate({
width: $(this).attr('aria-valuenow') + '%'
}, 200);
});
this.destroy();
}, offset: '50%'
});
/*
//Fixed-top menu
function fixedHeader() {
var ww = $(window).scrollTop();
if(ww > 0){
$('.menu').addClass('menu--active');
$('.mobile-menu').addClass('mobile-menu--active');
}else{
$('.menu').removeClass('menu--active');
$('.mobile-menu').removeClass('mobile-menu--active');
}
}
fixedHeader();
$(window).on('scroll', function () {
fixedHeader();
});
*/