When I click the submit input, my function to show other content and hide recent content is not working. I've tried using anchor and button tags with no success.
Here's the HTML code:
$(function(){
$('.btn .button').on('click', function(){
$('.container').show()
$('.container-two').hide()
})
})
* {
text-decoration: none;
}
body {
background: #8390A2;
}
...
...
.form-two .btn {
position: absolute;
padding-top: 14px;
right: 36.5%;
}
.active {
display: none;
}
...
...
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" charset="utf-8"></script>
I attempted to use addClass()
, removeClass()
, and css()
functions, but none of them resolved the issue. I also searched for solutions but couldn't find anything relevant to my problem.