I need assistance with displaying or hiding a div based on the length of text boxes. My project is structured using Backbone, so I am unsure about where to insert the code..
Here is my current code;
<input type="text" id="txtUsername" placeholder="username"><br> <input
type="text" id="txtPassword" placeholder="password">
<div id="results">
// text here
</div>
Javascript
$('#chooseScan').addClass('hide');
if ($('#txtUsername').val().length > 0 && $('#txtPassword').val().length > 0) {
$('#results').removeClass('hide');
$('#results').addClass('show');
}