Can anyone assist me in checking if a user has entered a specific letter or word and, if correct, display a button?
I would appreciate any guidance!
Here is my current code snippet:
$(document).ready(function() {
$(".textArea").keyup(function() {
if ($(this).val() == 'a') {
$(".continue").css("visibility", "visible");
}
});
});
body {
margin: 0;
padding: 0;
background-color: #3f2860;
}
.codeArea {
width: 50%%;
height: 500px;
border: 2px solid #ef6d3b;
box-sizing: border-box;
font-size: 20px;
background-color: transparent;
color: #ffffff;
outline-width: 0;
position: relative;
float: left;
margin-right: 5px;
}
.textArea {
width: 100%;
height: 100%;
resize: none;
font-size: 20px;
background-color: transparent;
color: #ffffff;
outline: none;
border: none;
white-space: normal;
position: relative;
float: left;
}
.boxContainer {
width: 98%;
}
.boxContainer {
margin: 0 auto;
}
.continue {
background-color: #ef6d3b;
width: 6em;
text-align: center;
font-size: 15px;
border: none;
height: 25px;
color: #000000;
outline: none;
cursor: pointer;
border-radius: 5px;
text-transform: uppercase;
position: relative;
visibility: hidden;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<div class="codeArea">
<textarea class="textArea">
<h1>Test</h1&62; <style> h1{ } </style>
</textarea>
</div>
<div class="buttonContainer">
<a href="#">
<button class="continue" type="button">Continue</button>
</a>
</div>