mirror of
https://github.com/inspec/inspec
synced 2024-12-25 20:43:13 +00:00
f79ec02efc
Also includes integration of Font awesome icons.
16 lines
No EOL
430 B
JavaScript
16 lines
No EOL
430 B
JavaScript
// Nav Scripts
|
|
const $navLinks = $('.main-nav--links');
|
|
const $navToggle = $('.main-nav--toggle');
|
|
const navBreakpoint = 730; // this should match $nav-breakpoint in _nav.scss
|
|
|
|
$navToggle.click(function() {
|
|
$(this).toggleClass('is-active');
|
|
$navLinks.slideToggle();
|
|
});
|
|
|
|
$(window).resize(function() {
|
|
if ($(window).width() >= navBreakpoint) {
|
|
$navToggle.removeClass('is-active');
|
|
$navLinks.attr("style", "");
|
|
}
|
|
}); |