This repository has been archived by the owner on Apr 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom.js
85 lines (69 loc) · 2.19 KB
/
custom.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
/* jQuery Pre loader
-----------------------------------------------*/
$(window).load(function(){
$('.preloader').fadeOut(1000); // set duration in brackets
});
/* Mobile Navigation
-----------------------------------------------*/
$(window).scroll(function() {
if ($(".navbar").offset().top > 50) {
$(".navbar-fixed-top").addClass("top-nav-collapse");
} else {
$(".navbar-fixed-top").removeClass("top-nav-collapse");
}
});
/* HTML document is loaded. DOM is ready.
-------------------------------------------*/
$(document).ready(function() {
/* Hide mobile menu after clicking on a link
-----------------------------------------------*/
$('.navbar-collapse a').click(function(){
$(".navbar-collapse").collapse('hide');
});
/* Parallax section
-----------------------------------------------*/
function initParallax() {
$('#intro').parallax("100%", 0.1);
$('#overview').parallax("100%", 0.3);
$('#detail').parallax("100%", 0.2);
$('#video').parallax("100%", 0.3);
$('#speakers').parallax("100%", 0.1);
$('#program').parallax("100%", 0.2);
$('#register').parallax("100%", 0.1);
$('#faq').parallax("100%", 0.3);
$('#venue').parallax("100%", 0.1);
$('#sponsors').parallax("100%", 0.3);
$('#contact').parallax("100%", 0.2);
}
initParallax();
/* Owl Carousel
-----------------------------------------------*/
$(document).ready(function() {
$("#owl-speakers").owlCarousel({
autoPlay: 6000,
items : 4,
itemsDesktop : [1199,2],
itemsDesktopSmall : [979,1],
itemsTablet: [768,1],
itemsTabletSmall: [985,2],
itemsMobile : [479,1],
});
});
/* Back top
-----------------------------------------------*/
$(window).scroll(function() {
if ($(this).scrollTop() > 200) {
$('.go-top').fadeIn(200);
} else {
$('.go-top').fadeOut(200);
}
});
// Animate the scroll to top
$('.go-top').click(function(event) {
event.preventDefault();
$('html, body').animate({scrollTop: 0}, 300);
})
/* wow
-------------------------------*/
new WOW({ mobile: false }).init();
});