Somehow, adding in a menu feature that has a solid white background has caused nothing else besides the menu to be clicked or interacted with and I'm not sure how to fix this issue.
The menu nav functions as it should by opening and closing and the links in the menu all function as they should.
However, I've been having problems because before I added the menu in the search bar worked and the image slideshow which makes me think that the menu nav is causing the problem.
var curpage = 1;
var sliding = false;
var click = true;
var left = document.getElementById("left");
var right = document.getElementById("right");
var pagePrefix = "slide";
var pageShift = 500;
var transitionPrefix = "circle";
var svg = true;
function leftSlide() {
if (click) {
if (curpage == 1) curpage = 5;
console.log("woek");
sliding = true;
curpage--;
svg = true;
click = false;
for (k = 1; k <= 4; k++) {
var a1 = document.getElementById(pagePrefix + k);
a1.className += " tran";
}
setTimeout(() => {
move();
}, 200);
setTimeout(() => {
for (k = 1; k <= 4; k++) {
var a1 = document.getElementById(pagePrefix + k);
a1.classList.remove("tran");
}
}, 1400);
}
}
function rightSlide() {
if (click) {
if (curpage == 4)
curpage = 0;
console.log("woek");
sliding = true;
curpage++;
svg = false;
click = false;
for (k = 1; k <= 4; k++) {
var a1 = document.getElementById(pagePrefix + k);
a1.className += " tran";
}
setTimeout(() => {
move();
}, 200);
setTimeout(() => {
for (k = 1; k <= 4; k++) {
var a1 = document.getElementById(pagePrefix + k);
a1.classList.remove("tran");
}
}, 1400);
}
}
function move() {
if (sliding) {
sliding = false;
if (svg) {
for (j = 1; j <= 9; j++) {
var c = document.getElementById(transitionPrefix + j);
c.classList.remove("steap");
c.setAttribute("class", transitionPrefix + j + " streak");
console.log("streak");
}
} else {
for (j = 10; j <= 18; j++) {
var c = document.getElementById(transitionPrefix + j);
c.classList.remove("steap");
c.setAttribute("class", transitionPrefix + j + " streak");
console.log("streak");
}
}
setTimeout(() => {
for (i = 1; i <= 4; i++) {
if (i == curpage) {
var a = document.getElementById(pagePrefix + i);
a.className += " up1";
} else {
var b = document.getElementById(pagePrefix + i);
b.classList.remove("up1");
}
}
sliding = true;
}, 600);
setTimeout(() => {
click = true;
}, 1700);
setTimeout(() => {
if (svg) {
for (j = 1; j <= 9; j++) {
var c = document.getElementById(transitionPrefix + j);
c.classList.remove("streak");
c.setAttribute("class", transitionPrefix + j + " steap");
}
} else {
for (j = 10; j <= 18; j++) {
var c = document.getElementById(transitionPrefix + j);
c.classList.remove("streak");
c.setAttribute("class", transitionPrefix + j + " steap");
}
sliding = true;
}
}, 850);
setTimeout(() => {
click = true;
}, 1700);
}
}
left.onmousedown = () => {
leftSlide();
};
right.onmousedown = () => {
rightSlide();
};
document.onkeydown = e => {
if (e.keyCode == 37) {
leftSlide();
} else if (e.keyCode == 39) {
rightSlide();
}
};
// setTimeout(() => {
// rightSlide();
// }, 500);
// menu nav
(function() {
var body = document.body;
var burgerMenu = document.getElementsByClassName('b-menu')[0];
var burgerContain = document.getElementsByClassName('b-container')[0];
var burgerNav = document.getElementsByClassName('b-nav')[0];
burgerMenu.addEventListener('click', function toggleClasses() {
[body, burgerContain, burgerNav].forEach(function(el) {
el.classList.toggle('open');
});
}, false);
})();
html,
body {
background-color: white;
}
.nav {
border-width: 1px 0;
list-style: none;
margin: 0;
padding: 0;
text-align: center;
font-family: "Gill Sans", serif;
color: black;
text-decoration: none;
font-size: 40px;
}
.nav li {
display: inline;
}
.nav a {
display: inline-block;
padding: 10px;
}
/* search icon */
#demo-2 input[type=search] {
width: 37px;
padding-left: 10px;
color: transparent;
cursor: pointer;
}
#demo-2 input[type=search]:hover {
background-color: #fff;
}
#demo-2 input[type=search]:focus {
width: 130px;
padding-left: 32px;
color: #000;
background-color: #fff;
cursor: auto;
}
#demo-2 input:-moz-placeholder {
color: transparent;
}
#demo-2 input::-webkit-input-placeholder {
color: transparent;
}
a {
color: #69C;
text-decoration: none;
}
a:hover {
color: #ffb54a;
}
input[type=search] {
background: #ededed url(https://static.tumblr.com/ftv85bp/MIXmud4tx/search-icon.png) no-repeat 9px center;
border: solid 1px #ccc;
padding: 9px 10px 9px 32px;
width: 55px;
-webkit-border-radius: 10em;
-moz-border-radius: 10em;
border-radius: 10em;
-webkit-transition: all .5s;
-moz-transition: all .5s;
transition: all .5s;
}
input {
outline: none;
}
.search-icon {
position: fixed;
right: 50px;
top: 24px;
}
/* slide show css */
@import url("https://fonts.googleapis.com/css?family=Heebo:800");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.parent {
width: 681px;
height: 384px;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto auto;
overflow: hidden;
position: fixed;
-webkit-box-shadow: 0 0 88px 5px rgba(0, 0, 0, 0.75);
-moz-box-shadow: 0 0 88px 5px rgba(0, 0, 0, 0.75);
box-shadow: 0 0 88px 5px rgba(0, 0, 0, 0.75);
}
svg {
position: absolute;
z-index: 1;
width: 681px;
height: 384px;
}
button {
position: absolute;
z-index: 50;
width: 40px;
overflow: hidden;
height: 40px;
border: none;
border-radius: 50%;
background: #fff;
cursor: pointer;
-webkit-box-shadow: 0 0 88px 5px rgba(0, 0, 0, 0.75);
-moz-box-shadow: 0 0 88px 5px rgba(0, 0, 0, 0.75);
box-shadow: 0 0 88px 5px rgba(0, 0, 0, 0.75);
}
button:focus {
outline-width: 0;
}
circle {
stroke: #fff;
fill: none;
transition: 0.3s;
}
#svg1 circle {
transition-timing-function: linear;
}
#svg2 circle {
transition-timing-function: linear;
}
#Capa_1 {
position: absolute;
width: 16px;
height: 16px;
transform: translate(-7px, -8px);
}
#Capa_2 {
position: absolute;
width: 16px;
height: 16px;
transform: translate(-9px, -8px);
}
.right {
margin-left: 628px;
margin-top: 168px;
border: 1px solid #849494;
background-color: transparent;
transition: 0.5s;
}
.right:hover {
background-color: #fff;
}
.left {
margin-left: 0.5%;
margin-top: 168px;
border: 1px solid #849494;
background-color: transparent;
transition: 0.5s;
}
.left:hover {
background-color: #fff;
}
.circle1 {
transition-delay: 0.05s;
}
.circle2 {
transition-delay: 0.1s;
}
.circle3 {
transition-delay: 0.15s;
}
.circle4 {
transition-delay: 0.2s;
}
.circle5 {
transition-delay: 0.25s;
}
.circle6 {
transition-delay: 0.3s;
}
.circle7 {
transition-delay: 0.35s;
}
.circle8 {
transition-delay: 0.4s;
}
.circle9 {
transition-delay: 0.45s;
}
.circle10 {
transition-delay: 0.05s;
}
.circle11 {
transition-delay: 0.1s;
}
.circle12 {
transition-delay: 0.15s;
}
.circle13 {
transition-delay: 0.2s;
}
.circle14 {
transition-delay: 0.25s;
}
.circle15 {
transition-delay: 0.3s;
}
.circle16 {
transition-delay: 0.35s;
}
.circle17 {
transition-delay: 0.4s;
}
.circle18 {
transition-delay: 0.45s;
}
.slide1 {
-webkit-filter: grayscale(100%);
/* Safari 6.0 - 9.0 */
background-image: url("one.JPG");
filter: grayscale(100%);
}
.slide2 {
-webkit-filter: grayscale(100%);
/* Safari 6.0 - 9.0 */
background-image: url("two.jpg");
filter: grayscale(100%);
}
.slide3 {
-webkit-filter: grayscale(100%);
/* Safari 6.0 - 9.0 */
background-image: url("three.JPG");
filter: grayscale(100%);
}
.slide4 {
-webkit-filter: grayscale(100%);
/* Safari 6.0 - 9.0 */
background-image: url("four.jpg");
filter: grayscale(100%);
}
.slider {
position: absolute;
width: 400%;
height: 100%;
background: #000;
display: inline-flex;
overflow: hidden;
}
.slide1,
.slide2,
.slide3,
.slide4 {
position: absolute;
background-position: center;
background-size: cover;
color: #fff;
font-size: 62px;
padding-top: 138px;
font-weight: 800;
font-family: "Heebo", sans-serif;
text-align: center;
width: 25%;
height: 100%;
z-index: 10;
transition: 1.4s;
}
.tran {
transform: scale(1.3);
}
.up1 {
z-index: 20;
}
.up2 {
z-index: 40;
}
.steap {
stroke-width: 0;
}
.streak {
stroke-width: 82px;
}
@media (max-width: 700px) {
.parent {
margin-left: 1%;
}
}
/* menu nav */
@keyframes slideInLeft {
0% {
transform: translate3d(-250px, 0, 0);
visibility: visible;
}
100% {
transform: translate3d(0, 0, 0);
}
}
@keyframes slideOutLeft {
0% {
transform: translate3d(0, 0, 0);
}
100% {
transform: translate3d(-250px, 0, 0);
visibility: hidden;
}
}
* {
box-sizing: border-box;
}
body:after {
background: white;
content: "";
height: 100%;
left: 0;
opacity: 0;
overflow: auto;
padding: 0;
position: absolute;
top: 0;
transition: all 0.4s ease;
width: 100%;
}
body.open {
overflow: hidden;
}
body.open:after {
opacity: 1;
visibility: visible;
}
.b-nav {
position: absolute;
z-index: 11;
}
.b-nav:not(.open) {
visibility: hidden;
}
.b-nav li {
color: #444444;
list-style-type: none;
padding: 10px;
text-align: left;
transform: translateX(-250px);
}
.b-nav li:not(.open) {
animation-duration: 0.4s;
animation-fill-mode: both;
animation-name: slideOutLeft;
}
.b-nav li:first-child {
padding-top: 120px;
}
.b-nav.open {
visibility: visible;
}
.b-nav.open li {
animation-duration: 0.4s;
animation-fill-mode: both;
animation-name: slideInLeft;
}
.b-link {
background: transparent;
border-left: rgba(68, 68, 68, 0) solid 2px;
color: #444444;
font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;
font-size: 24px;
font-weight: 300;
margin-left: 30px;
text-decoration: none;
transition: all 0.4s ease;
width: auto;
}
.b-link:hover,
.b-link--active {
border-left: #444444 solid 2px;
padding-left: 30px;
}
.b-menu {
background: white;
border: white solid 2px;
border-radius: 50%;
cursor: pointer;
display: inline-block;
height: 60px;
padding-left: 15.5px;
padding-top: 17.5px;
position: relative;
transition: all 0.4s ease;
user-select: none;
width: 60px;
z-index: 12;
}
.b-menu:hover {
border: #444444 solid 2px;
}
.b-bun {
background: #444444;
position: relative;
transition: all 0.4s ease;
}
.b-bun--top {
height: 2px;
top: 0;
width: 25px;
}
.b-bun--mid {
height: 2px;
top: 8px;
width: 25px;
}
.b-bun--bottom {
height: 2px;
top: 16px;
width: 25px;
}
.b-brand {
color: white;
font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;
font-size: 24px;
font-weight: 300;
margin-left: 30px;
position: relative;
text-decoration: none;
top: -21.4285714286px;
transition: all 0.4s ease;
z-index: 13;
}
.b-container {
height: 60px;
left: 30px;
position: absolute;
top: 30px;
}
.b-container:hover:not(.open) .bun-top,
.b-container:hover:not(.open) .bun-mid,
.b-container:hover:not(.open) .bun-bottom {
background: white;
}
.b-container.open .b-main {
border: #444444 solid 2px;
}
.b-container.open .b-bun--top {
background: #444444;
top: 9px;
transform: rotate(45deg);
}
.b-container.open .b-bun--mid {
opacity: 0;
}
.b-container.open .b-bun--bottom {
background: #444444;
top: 5px;
transform: rotate(-45deg);
}
.b-container.open .b-brand {
color: #444444;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.16.1/TweenMax.min.js"></script>
<div>
<ul class="nav">
<li><a href="home.html" class="nav">TEST</a></li>
</ul>
<div class="search-icon">
<form id="demo-2">
<label><input type="search" placeholder="Search"></label>
</form>
</div>
</div>
<!-- Menu Navigation -->
<div class="b-nav">
<li><a class="b-link" href="home.html" target="_blank">Home</a></li>
<li><a class="b-link" href="https://twitter.com/" target="_blank">About</a></li>
<li><a class="b-link" href="https://twitter.com/" target="_blank">Products</a></li>
<li><a class="b-link" href="https://twitter.com/" target="_blank">Contact Us</a></li>
</div>
<!-- Burger-Icon -->
<div class="b-container">
<div class="b-menu">
<div class="b-bun b-bun--top"></div>
<div class="b-bun b-bun--mid"></div>
<div class="b-bun b-bun--bottom"></div>
</div>
<!-- Burger-Brand -->
<!-- <a href="#" class="b-brand">Burger</a>-->
</div>
<!--slideshow-->
<div class='parent'>
<div class='slider'>
<button type="button" id='right' class='right' name="button">
<svg version="1.1" id="Capa_1" width='40px' height='40px ' xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 477.175 477.175" style="enable-background:new 0 0 477.175 477.175;" xml:space="preserve">
<g>
<path style='fill: #9d9d9d;' d="M360.731,229.075l-225.1-225.1c-5.3-5.3-13.8-5.3-19.1,0s-5.3,13.8,0,19.1l215.5,215.5l-215.5,215.5c-5.3,5.3-5.3,13.8,0,19.1c2.6,2.6,6.1,4,9.5,4c3.4,0,6.9-1.3,9.5-4l225.1-225.1C365.931,242.875,365.931,234.275,360.731,229.075z"/>
</g>
</svg>
</button>
<button type="button" id='left' class='left' name="button">
<svg version="1.1" id="Capa_2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 477.175 477.175" style="enable-background:new 0 0 477.175 477.175;" xml:space="preserve">
<g>
<path style='fill: #9d9d9d;' d="M145.188,238.575l215.5-215.5c5.3-5.3,5.3-13.8,0-19.1s-13.8-5.3-19.1,0l-225.1,225.1c-5.3,5.3-5.3,13.8,0,19.1l225.1,225c2.6,2.6,6.1,4,9.5,4s6.9-1.3,9.5-4c5.3-5.3,5.3-13.8,0-19.1L145.188,238.575z"/>
</g>
</svg>
</button>
<svg id='svg2' class='up2' xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<circle id='circle1' class='circle1 steap' cx="34px" cy="49%" r="20"/>
<circle id='circle2' class='circle2 steap' cx="34px" cy="49%" r="100"/>
<circle id='circle3' class='circle3 steap' cx="34px" cy="49%" r="180"/>
<circle id='circle4' class='circle4 steap' cx="34px" cy="49%" r="260"/>
<circle id='circle5' class='circle5 steap' cx="34px" cy="49%" r="340"/>
<circle id='circle6' class='circle6 steap' cx="34px" cy="49%" r="420"/>
<circle id='circle7' class='circle7 steap' cx="34px" cy="49%" r="500"/>
<circle id='circle8' class='circle8 steap' cx="34px" cy="49%" r="580"/>
<circle id='circle9' class='circle9 steap' cx="34px" cy="49%" r="660"/>
</svg>
<svg id='svg1' class='up2' xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<circle id='circle10' class='circle10 steap' cx="648px" cy="49%" r="20"/>
<circle id='circle11' class='circle11 steap' cx="648px" cy="49%" r="100"/>
<circle id='circle12' class='circle12 steap' cx="648px" cy="49%" r="180"/>
<circle id='circle13' class='circle13 steap' cx="648px" cy="49%" r="260"/>
<circle id='circle14' class='circle14 steap' cx="648px" cy="49%" r="340"/>
<circle id='circle15' class='circle15 steap' cx="648px" cy="49%" r="420"/>
<circle id='circle16' class='circle16 steap' cx="648px" cy="49%" r="500"/>
<circle id='circle17' class='circle17 steap' cx="648px" cy="49%" r="580"/>
<circle id='circle18' class='circle18 steap' cx="648px" cy="49%" r="660"/>
</svg>
<div id='slide1' class='slide1 up1'>EXAMPLE1</div>
<div id='slide2' class='slide2'>EXAMPLE2</div>
<div id='slide3' class='slide3'>EXAMPLE3</div>
<div id='slide4' class='slide4'>EXAMPLE4</div>
</div>
</div>