-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
40 lines (37 loc) · 900 Bytes
/
script.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
$(document).ready(function () {
$("a").on("click", function (e) {
if (this.hash !== "") {
e.preventDefault();
var hash = this.hash;
$("html, body").animate(
{
scrollTop: $(hash).offset().top,
},
500,
function () {
window.location.hash = hash;
}
);
}
});
});
const $simpleCarousel = document.querySelector(".js-carousel--simple");
new Glider($simpleCarousel, {
slidesToShow: 1,
slidesToScroll: 1,
draggable: true,
dots: ".js-carousel--simple-dots",
arrows: {
prev: ".js-carousel--simple-prev",
next: ".js-carousel--simple-next",
},
});
function openNav() {
document.querySelector("#mobile-nav").style.width = "35%";
}
function closeNav() {
document.querySelector("#mobile-nav").style.width = "0%";
}
function onSubmit(token) {
document.getElementById("demo-form").submit();
}