Jquery Live Search Filter Example with Demo

Today, We want to share with you Jquery Live Search Filter Example with Demo.In this post we will show you How To Create a Filter/Search List using jquery, hear for jQuery Search, sort, filters, flexibility to tables and list we will give you demo and example for implement.In this post, we will learn about jQuery Filtering – Simple Data Filtering Using jQuery with an example.

Jquery Live Search Filter Example with Demo

There are the Following The simple About Jquery Live Search Filter Example with Demo Full Information With Example and source code.

As I will cover this Post with live Working example to develop Simple search filter using jQuery, so the Filtering List Data with a jQuery-searchFilter Plugin for this example is following below.

Example 1 : Jquery Search Filter

index.html File (HTML Interface source code)

For this Jquery Search Filter Example, I am giving it the id livesearch


jQuery simple keyup function


$("#livesearch").keyup(function() {
	var myval = this.value;

	$("table").find("tr").each(function(index) {
		if (!index) return;
		var getid = $(this).find("td").text();
		$(this).toggle(getid.indexOf(myval) !== -1);
	});
});
	

$("table").find("tr").each(function(index) {})

jQuery function will execute or run the all statement lets stated below it each special time the run HTML table row Data content tr or td matches the all data value fetched from the find or search each field.

jQuery Search Filter Plugins Example

Example 2 : Simple search filter using jQuery

Step 1) Copy this jQuery to your Application

  

Step 2) Include [data-search] to search input

	

Step 3) Include [data-filter-member] to the items that should be filtered

  
Jaydeep
Rakesh
Krunal
Dhaval
Mayur
Hitesh

Step 4) Include [data-filter-name=”SEARCH TERM”] to the filter-items



$('[data-search]').on('keyup', function() {
	var termValue = $(this).val();
	var filterMembers = $('[data-filter-member]');

	if ( termValue != '' ) {
		filterMembers.addClass('valHide');
		$('[data-filter-member][data-filter-name*="' + termValue.toLowerCase() + '"]').removeClass('valHide');
	} else {
		filterMembers.removeClass('valHide');
	}
});
	

Step 5) Include Custom CSS Style


.container {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  width: 50%;
}
.search {
  margin-bottom: 29px;
}
[data-filter-member] {
  padding: 15px;
  background-color: #3d3d3d;
  border: 1px solid #fff;
}
.valHide {
  display: none;
}


Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Jquery Live Search Filter Example with Demo.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment