$(document).ready(function(){
$("#ltt").on("keyup", function() {
var value = $(this).val().toLowerCase();
$("#ltt tr").filter(function() {
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
if (this[0]){
"nothing found"
}
});
});
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<input id="ltt" type="text" placeholder="Search..">
<br><br>
<table>
<thead>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Birthday</th>
</tr>
</thead>
<tbody id="ltt">
<tr>
<td>James</td>
<td>Heier</td>
<td>30 April 1983</td>
</tr>
<tr>
<td>Sandro</td>
<td>Key</td>
<td>14 May 1986</td>
</tr>
</tbody>
</table>
i'm trying to add a line in case no match found, can you support me and tell me what i'm doing wrong? i put the whole query. Please find below the script thank you so much for your help and support