I want to show user if the text entered match with another text box value
So i have written a jQuery function to check weather if entered value matched with the existing textbox value
$('#password, #confirm_password').on('keyup', function() {
if ($('#password').val() == $('#confirm_password').val()) {
$('#message').html('Matching').css('color', 'green');
} else
$('#message').html('Not Matching').css('color', 'red');
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<label>
text1 :
<input name="password" id="password" type="text" value="ABC" />
</label>
<br>
<label>
text2:
<input type="text" name="confirm_password" id="confirm_password" />
</label>
<div id="message"></div>
I want the jquery to accept match even user entered without case sensitive matching