-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscrip.js
55 lines (38 loc) · 1.4 KB
/
scrip.js
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
48
49
50
51
52
53
// const abs =document.getElementById('blur');
// const bs=
function myFunction() {
var blur=document.getElementById("blur");
blur.classList.toggle("active");
var popup = document.getElementById("myPopup");
popup.classList.toggle("show");
// var popup = document.getElementById("myPopup");
// popup.classList.toggle("show");
}
function myFunctio() {
var popup = document.getElementById("myPopu");
popup.classList.toggle("show");
}
function myFunctio1() {
var popup = document.getElementById("myPopu1");
popup.classList.toggle("show");
}
function myFunctio2() {
var popup = document.getElementsByClassName("Popup");
popup.classList.remove("show");
}
document.addEventListener('DOMContentLoaded', function () {
const searchInput = document.getElementById('searchInput');
searchInput.addEventListener('input', function () {
const searchTerm = searchInput.value.toLowerCase();
const recipes = document.querySelectorAll('.menu_card');
recipes.forEach(function (recipe) {
const recipeName = recipe.getAttribute('data-search').toLowerCase();
const isMatch = recipeName.includes(searchTerm);
if (isMatch) {
recipe.style.display = 'block';
} else {
recipe.style.display = 'none';
}
});
});
});