Fix typo in menu button class
- .navtoogle should be .navtoggle - Fixes #175
This commit is contained in:
parent
e7489a139d
commit
d5a0a2e585
3 changed files with 6 additions and 6 deletions
|
@ -165,7 +165,7 @@ $button-size: 1.5rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Style the toggle menu link and hide it
|
// Style the toggle menu link and hide it
|
||||||
.nav .navtoogle {
|
.nav .navtoggle {
|
||||||
@include font-rem(18);
|
@include font-rem(18);
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
background-color: $black;
|
background-color: $black;
|
||||||
|
@ -180,7 +180,7 @@ $button-size: 1.5rem;
|
||||||
border: none;
|
border: none;
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
.navtoogle i {
|
.navtoggle i {
|
||||||
z-index:-1;
|
z-index:-1;
|
||||||
}
|
}
|
||||||
.icon-menu {
|
.icon-menu {
|
||||||
|
|
|
@ -13,11 +13,11 @@ var changeClass = function (r,className1,className2) {
|
||||||
};
|
};
|
||||||
// Creating our button in JS for smaller screens
|
// Creating our button in JS for smaller screens
|
||||||
var menuElements = document.getElementById('site-nav');
|
var menuElements = document.getElementById('site-nav');
|
||||||
menuElements.insertAdjacentHTML('afterBegin','<button type="button" role="button" id="menutoggle" class="navtoogle navicon-lines-button x" aria-hidden="true"><span class="navicon-lines"></span>menu</button>');
|
menuElements.insertAdjacentHTML('afterBegin','<button type="button" role="button" id="menutoggle" class="navtoggle navicon-lines-button x" aria-hidden="true"><span class="navicon-lines"></span>menu</button>');
|
||||||
|
|
||||||
// Toggle the class on click to show / hide the menu
|
// Toggle the class on click to show / hide the menu
|
||||||
document.getElementById('menutoggle').onclick = function() {
|
document.getElementById('menutoggle').onclick = function() {
|
||||||
changeClass(this, 'navtoogle active', 'navtoogle');
|
changeClass(this, 'navtoggle active', 'navtoggle');
|
||||||
};
|
};
|
||||||
// http://tympanus.net/codrops/2013/05/08/responsive-retina-ready-menu/comment-page-2/#comment-438918
|
// http://tympanus.net/codrops/2013/05/08/responsive-retina-ready-menu/comment-page-2/#comment-438918
|
||||||
document.onclick = function(e) {
|
document.onclick = function(e) {
|
||||||
|
@ -25,7 +25,7 @@ document.onclick = function(e) {
|
||||||
buttonStyle = mobileButton.currentStyle ? mobileButton.currentStyle.display : getComputedStyle(mobileButton, null).display;
|
buttonStyle = mobileButton.currentStyle ? mobileButton.currentStyle.display : getComputedStyle(mobileButton, null).display;
|
||||||
|
|
||||||
if(buttonStyle === 'block' && e.target !== mobileButton && new RegExp(' ' + 'active' + ' ').test(' ' + mobileButton.className + ' ')) {
|
if(buttonStyle === 'block' && e.target !== mobileButton && new RegExp(' ' + 'active' + ' ').test(' ' + mobileButton.className + ' ')) {
|
||||||
changeClass(mobileButton, 'navtoogle active', 'navtoogle');
|
changeClass(mobileButton, 'navtoggle active', 'navtoggle');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
2
assets/js/scripts.min.js
vendored
2
assets/js/scripts.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue