$('#asearch').on('input', function(){
let a = $(this).val();
$('.title').hide();
$('.title:contains(' + a + ')').show();
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input type = 'search' class='asearch' id='asearch' placeholder='Search'>
<div class='title'>loRem</div>
<div class='title'>IpsuM</div>
I want to get the first title visible if lor
is typed inside the search box and the second title if i
is typed i.e. want the search box to be case insensitive.
Any help?