-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
28 lines (28 loc) · 901 Bytes
/
index.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
(function () {
'use strict';
$(function () {
var header = $(".start-style");
$(window).scroll(function () {
var scroll = $(window).scrollTop();
if (scroll >= 10) {
header.removeClass('start-style').addClass("scroll-on");
} else {
header.removeClass("scroll-on").addClass('start-style');
}
});
});
// Animation
$(document).ready(function () {
$('body.hero-anime').removeClass('hero-anime');
});
// Menu on hover
$('body').on('mouseenter mouseleave', '.nav-item', function (e) {
if ($(window).width() > 750) {
var _d = $(e.target).closest('.nav-item');
_d.addClass('show');
setTimeout(function () {
_d[_d.is(':hover') ? 'addClass' : 'removeClass']('show');
}, 1);
}
});
})();