-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgatsby-browser.js
44 lines (41 loc) · 1.36 KB
/
gatsby-browser.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
import $ from 'jquery';
import 'slick-carousel';
/**
* Implement Gatsby's Browser APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/browser-apis/
*/
// You can delete this file if you're not using it
export const onRouteUpdate=()=>{
$(document).ready(function(){
$('.customer-logos').slick({
slidesToShow: 3,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 2000,
arrows: false,
dots: false,
pauseOnHover: false,
responsive: [{
breakpoint: 768,
settings: {
slidesToShow: 1
}
}, {
breakpoint: 520,
settings: {
slidesToShow: 1
}
}]
});
});
let hamburger = document.querySelector(".hamburger");
// On click
hamburger.addEventListener("click", function() {
// Toggle class "is-active"
hamburger.classList.toggle("is-active");
// Do something else, like open/close menu
document.querySelector("#mobile-title").classList.toggle("hidden");
document.querySelector(".mobile-menu").classList.toggle("activated");
});
}