search in jquery code example
Example 1: search in a table jquery
<script>
$(document).ready(function(){
$("#myInput").on("keyup", function() {
var value = $(this).val().toLowerCase();
$("#myTable tr").filter(function() {
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
});
});
});
</script>
Example 2: search functionality in jquery
<input id="search-date1" class="pull-right" value="" placeholder="Search Material" type="text"/>
$('#search-date1').keyup(function(){
var value = this.value.toLowerCase();
$('.modal_iterator_row').each(function(){
var id = $(this).text().toLowerCase();
$(this).toggle(id.indexOf(value) !== -1);
})
});