Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function myFunction() {
- var input = document.getElementById("Search");
- var filter = input.value.toLowerCase();
- var nodes = document.getElementsByClassName('connect-cat');
- for (i = 0; i < nodes.length; i++) {
- if (nodes[i].innerHTML.toLowerCase().includes(filter)) {
- nodes[i].style.display = "block";
- } else {
- nodes[i].style.display = "none";
- }
- }
- }
- function experienceMore() {
- document.getElementById("Search").value = "Experience more campaign";
- }
- function firstChoice() {
- document.getElementById("Search").value = "First choice";
- }
- <input type="text" id="Search" onKeyup="myFunction()" Placeholder="Please enter a search term...">
Add Comment
Please, Sign In to add comment