-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathiris.js
79 lines (62 loc) · 2.04 KB
/
iris.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
$(document).ready(function () {
// IRIS
$(".inspire,.resonate,.integrate,.succeed").on('mouseenter', function () {
$(this).addClass("animated rubberBand");
});
$(".inspire,.resonate,.integrate,.succeed").on('mouseleave', function () {
$(this).removeClass("animated rubberBand");
});
// FORCE PAGE TO LOAD FROM TOP (0,0) ON EVERY LOAD
window.onbeforeunload = function () {
window.scrollTo(0, 0);
}
//CLICK TO SCROLL DOWN
$('#d-arrow').on('click', function (e) {
e.preventDefault();
$("html").scrollTop(0);
// body...
$('html,body').animate({
scrollTop: $('.scrollable').offset().top - 64
}, 1500);
})
//AOS-animate on scroll
AOS.init();
// MATERIALIZE INITIALIZATION
$('.sidenav').sidenav({
width: 240,
draggable: true,
inDuration: 400,
outDuration: 400
})
.on('click tap', "#mylink", () => {
$('.sidenav').sidenav('close');
});
$(".dropdown-trigger").dropdown();
//ADDING BLACK BG_COLOR TO NAVBAR AFTER 300px SCROLL FROM TOP
$(window).scroll(function () {
if ($(window).scrollTop() > 300) {
$('.nav-wrapper').addClass('black');
// $('.brand-logo > #mylogo').addClass('animated zoomIn');
}
else {
$('.nav-wrapper').removeClass('black');
// $('.brand-logo > #mylogo').removeClass('animated zoomIn');
}
});
});
$('.sameLink').on('click', function () {
$('.sidenav').sidenav('close');
});
function toggleDd() {
$('.dropdown-trigger').removeClass('closed').addClass('opened').dropdown('open');
if ($('.dropdown-trigger').has('opened')) {
$('.dropdown-trigger').removeClass('opened').addClass('closed');
$('.dropdown-trigger').dropdown('close');
}
// HEMANT
$("figure").mouseleave(
function () {
$(this).removeClass("hover");
}
);
}