Bootstrap 4 Tutorial
There isn’t a filterable component in Bootstrap. Nevertheless, we may search for and filter components using jQuery.
Conduct a search for elements in a table without regard to case:
To search the table for first names, last names, or emails, enter text in the input field:
An explanation of the example: To see if there are any text values that match the value entered in the input field, we utilize jQuery to loop through each row of the table. The row (display:none) that does not match the search is hidden using the toggle method. The text is converted to lower case using the toLowerCase() method, which makes the search case insensitive and accepts “john,” “John,” and even “JOHN”.
Do the following to search a list of items without regard to case:
Conduct a search for text inside a div element without regard to case:
CodingAsk.com is designed for learning and practice. Examples may be made simpler to aid understanding. Tutorials, references, and examples are regularly checked for mistakes, but we cannot guarantee complete accuracy. By using CodingAsk.com, you agree to our terms of use, cookie, and privacy policy.
Copyright 2010-2024 by Refsnes Data. All Rights Reserved.