-
Notifications
You must be signed in to change notification settings - Fork 4
/
filter.html
47 lines (44 loc) · 1.39 KB
/
filter.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<style>
/* Style the input field */
#myInput {
padding: 20px;
margin-top: -6px;
border: 0;
border-radius: 0;
background: #eaeff0;
}
</style>
</head>
<body>
<div class="container">
<p>Open the dropdown menu and type something in the input field to search for dropdown items:</p>
<div class="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">
<img src = C:\Users\user\Pictures\filter_image.png height= "40" width="40">Filter
<span class="caret"></span> </button>
<ul class="dropdown-menu">
<li><a href="#">Price (Low-High)</a></li>
<li><a href="#">Price (High-Low)</a></li>
<li><a href="#">Rating</a></li>
<li><a href="#">Name (A-Z)</a></li>
</ul>
</div>
</div>
<!-- <script>
$(document).ready(function(){
$("#myInput").on("keyup", function() {
var value = $(this).val().toLowerCase();
$(".dropdown-menu li").filter(function() {
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
});
});
});
</script> -->
</body>
</html>