JQuery Live Search Basic Example
How do I make an jquery live search basic example?
What is a jquery live search basic example? How do you make a jquery live search basic example? This script and codes were developed by Html5andblog on 21 August 2022, Sunday.
JQuery Live Search Basic Example - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>jQuery Live Search Basic Example</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <input type="text" class="live-search-box" placeholder="search here" />
<ul class="live-search-list">
<li>Lorem</li>
<li>ipsum</li>
<li>dolor</li>
<li>sit</li>
<li>amet</li>
</ul> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
JQuery Live Search Basic Example - Script Codes CSS Codes
.live-search-list {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 1em;
background-color: #2c3e50;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
font-family: 'Lato', sans-serif;
color: #fff;
}
.live-search-box {
width: 100%;
display: block;
padding: 1em;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
border: 1px solid #3498db;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.live-search-list li {
color: fff;
list-style: none;
padding: 0;
margin: 5px 0;
}
JQuery Live Search Basic Example - Script Codes JS Codes
jQuery(document).ready(function($){
$('.live-search-list li').each(function(){
$(this).attr('data-search-term', $(this).text().toLowerCase());
});
$('.live-search-box').on('keyup', function(){
var searchTerm = $(this).val().toLowerCase(); $('.live-search-list li').each(function(){ if ($(this).filter('[data-search-term *= ' + searchTerm + ']').length > 0 || searchTerm.length < 1) { $(this).show(); } else { $(this).hide(); } });
});
});
Developer | Html5andblog |
Username | html5andblog |
Uploaded | August 21, 2022 |
Rating | 3.5 |
Size | 2,050 Kb |
Views | 56,672 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
HTML5 Canvas Animated Background Part 2 | 3,154 Kb |
Detect Image Orientation with JavaScript | 1,870 Kb |
JQuery Live Search on an RSS Feed | 2,312 Kb |
Particles JS Background | 2,863 Kb |
Brick by Brick - Full Functionality - Infinite Scroll | 4,497 Kb |
Animated CSS Background - Moves with Cursor | 1,905 Kb |
Styling HTML Checkboxes | 2,043 Kb |
Snow Flurry Version 2 | 1,898 Kb |
JQuery News Ticker | 2,731 Kb |
Letter by Letter JS Example | 2,477 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Price table | Serluk | 5,928 Kb |
Flex Table | Simeonoff | 4,059 Kb |
Ripples in water | Nobitagit | 2,704 Kb |
CSS Org Chart | Appirio-ux | 3,882 Kb |
A Pen by Paul Sullivan | Pwsm50 | 2,349 Kb |
Practice using Wixel | Emnk | 3,057 Kb |
SVG email test v2.0 | M_J_Robbins | 2,090 Kb |
Ionic - Wordpress REST API starter | Superpikar | 2,961 Kb |
Mobile Nav Menu | AliKlein | 4,745 Kb |
Animated SVG stroke-dasharray | Netsi1964 | 3,179 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!