Проблема в том, что ваш .signupForm
существует внутри .reg
, поэтому он не отображается.
Итак, я переместил reg
из:
<div class="container reg">
Вниз в :
<div class="row justify-content-center reg">
Демо
jQuery(document).ready(function($) {
$('.signupForm').hide();
$(".login").click(function() {
$('.reg').hide();
$(".signupForm").show(300);
});
});
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.5.1.js" integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc=" crossorigin="anonymous"></script>
html:
<section>
<div class="container">
<div class="row justify-content-center reg">
<div class="col-12 col-md-8 col-lg-8 col-xl-6">
<div class="row">
<div class="col text-center">
<h1>Register</h1>
</div>
</div>
<div class="row align-items-center mt-4">
<div class="col">
<input type="email" class="form-control" placeholder="Email">
</div>
</div>
<div class="row align-items-center mt-4">
<div class="col">
<input type="password" class="form-control" placeholder="Password">
</div>
</div>
<div class="row justify-content-start mt-4">
<div class="col">
<button class="btn btn-primary mt-4">Register</button>
<button class="btn btn-primary mt-4 login">Login</button>
</div>
</div>
</div>
</div>
<div class="signupForm">
<div class="row align-items-center mt-4">
<div class="col">
<input type="email" class="form-control" placeholder="Email">
</div>
</div>
<div class="row align-items-center mt-4">
<div class="col">
<input type="password" class="form-control" placeholder="Password">
</div>
</div>
</div>
</div>
</section>