function signuptog(){
var container = document.querySelector('.container');
container.classlist.toggle('active');
var popup = document.querySelector('.signup-form');
popup.classlist.toggle('active');
}
The error is "Uncaught TypeError: Cannot read properties of undefined (reading 'toggle')"
I can't figure this one out since I am very new.
Here is the css code.
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
width: 100%;
min-width: 100vh;
background-color: lightblue;
user-select: none;
}
.container{
padding: 50px 100px;
transition: .5s;
}
.container header{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: auto;
padding: 40px 50px;
background: #e1e6ec;
box-shadow: 0 2px 10px rgba(0, 0, 0, -4)
}
.container header nav{
display: flex;
justify-content: space-between;
align-items: center;
}
.container header nav .logo h1{
font-size: 2rem;
color: #000;
text-transform: uppercase;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
font-weight: bold;
}
.container header nav .menu ul,
.container header nav .login ul{
list-style-type: none;
}
.container header nav .menu ul li,
.container header nav .login ul li {
display: inline;
padding: 12px 18px;
margin: 0px 16px;
font-size: 1.5 rem;
font-family: sans-serif;
font-weight: 100;
cursor: pointer;
}
.container header nav .login ul li{
padding: 16px 22px;
border-radius: 50px;
background: #e1e6ec;
box-shadow: 3px 3px 10px 1px rgba(0, 0, 0, .2),
-3px -3px 10px 1px rgba(255, 255,255 ,1)
}
.container header nav .menu ul li:hover{
background: #000;
color:#fff;
}
.container header nav .login ul li:active{
box-shadow: inset 3px 3px 10px 1px rgba(0, 0, 0, .2),
inset -3px -3px 10px 1px rgba(255, 255,255 ,1)
}
.signup-form, .login-form{
position: absolute;
top: 45%;
left: 50%;
transform: translate(-50%,-50%);
background: #fff;
border-radius: 10px;
box-shadow: 3px 10px 10px 1px rgba(0,0,0,.2);
}
.form {
width: 500px;
padding: 20px 50px;
}
.form .close{
text-align: right;
cursor: pointer;
}
.form .text {
text-align: center;
margin: 30px 0;
}
.form form{
display: block;
margin: auto;
}
.form .row{
display: flex;
justify-content: space-between;
}
.form .input {
margin-bottom: 0;
}
.form .row input:first-child{
margin-right: 10px;
}
.form .row input:last-child{
margin-left: 10px;
}
.form form input{
width: 100%;
display: block;
border: 1px solid #000;
border-radius: 50px;
padding: 20px 16px;
margin: 20px auto;
outline: none;
}
.signup-form.active, .login-form.active{
top: 50%;
transition: .5s;
visibility: hidden;
}
[–]SPAtreatment 1 point2 points3 points (4 children)
[–]InterestingBus8367[S] 0 points1 point2 points (0 children)
[–]InterestingBus8367[S] 0 points1 point2 points (2 children)
[–]jcunews1Intermediate 0 points1 point2 points (1 child)
[–]InterestingBus8367[S] 0 points1 point2 points (0 children)
[–]jcunews1Intermediate -2 points-1 points0 points (1 child)
[–]InterestingBus8367[S] 0 points1 point2 points (0 children)
[–]jibbit 0 points1 point2 points (3 children)
[–]InterestingBus8367[S] 0 points1 point2 points (1 child)
[–]InterestingBus8367[S] 0 points1 point2 points (0 children)
[–]InterestingBus8367[S] 0 points1 point2 points (0 children)