JavaScript DOM Tutorial #16 - Custom Search Filter

preview_player
Показать описание
Hey gang, in this JavaScript DOM tutorial I'll show you how we can create a custom JS search filter using the 'keyup' event as well as several other techniques we've learnt so far in the series.

----- COURSE LINKS:

---------------------------------------------------------------------------------------------
Other tutorials:

----- JAVASCRIPT FOR BEGINNERS:

----- CSS FOR BEGINNERS:

----- NODE.JS TUTORIALS

============== The Net Ninja =====================

================== Social Links ==================

Рекомендации по теме
Комментарии
Автор

Wow, this is better than the majority of videos I buy on Udemy. With the explosion of JavaScript, and most employers wanting “Vanilla JS”, I’ve been searching for good, quality Vanilla JS videos. The topic/project here is amazing. Please post more project-based JavaScript videos like these! Your teaching style is amazing!

deveagle
Автор

.includes() will be little bit more concisely and semantically correct than .indexOf()
Big thx for this tutor!

aayubov
Автор

Thanks net ninja for giving so much back to the community with your tutorials.

amanansari
Автор

You are amazing, I spent so much time trying to figure this out on my own and from other peoples code. but yours is simple and straight to the point. Thanks!

chasehudson
Автор

Shaun is the best of all :D He knows how to explain programming language in a human understanding way!!

rubitiara
Автор

Thanks a lot for the videos. I just want to add that in this case I prefer using 'input' event, it fires whenever the value of input changes. And I used search() method to filter the books. I think those two technique are more straightforward and more readable.

oussamatarhi
Автор

I became you fan after watching these dom element videos in javascript thanks alot

zuber
Автор

wow loved it, reminded me how it all works thank you dude

codedynamics
Автор

This is the code worked with me:
<form id="search-truck">
<input type="text">
</form>
<ul class="menubar" id="menuList" style="list-style: none;"></ul>


var list =


const searchBar =
searchBar.addEventListener('keyup', function(e){
const term = e.target.value.toLowerCase();
const books =

console.log("book: "+ book.textContent);
const title =
if(title.includes(term)){
book.style.display = 'block';
}
else {
book.style.display = 'none';
}
})
})

HasanAYousef
Автор

What a lesson!!!! Appreciate your teaching quality.

tanvir
Автор

I loved been with u guys, you're the best.
pls can u make a series on online billing system.

moriekormoh
Автор

This is a very good tips, but I got the hover type search bar and I don't know how to make it as you did for the <ul><li> tags and surely I have should be saving this for next project. Thanks

kucal
Автор

Hey Net Ninja .... You are just awesome teacher..

NehaSingh-xown
Автор

Thanks! This helped me a lot with a project I’m working on

lep
Автор

if(!title.includes(term)){
element.style.display = 'none';
} else {
element.style.display = 'block';
}

//I did like this and worked. Thanks for the great video

anaragayevafr
Автор

Can I replace the <li> tag with the <div> tag?

NganNguyen-mfbr
Автор

Tutorial Series wa Subarashi deshta, arigato gozaimashita Net Ninja san!

lardosian
Автор

Thanks for this great project tutorial bro. I have got a lot from it. keep on bro. thanks very much

markreeves
Автор

Amazing! You are a genius! Thank you !

stefaniaia
Автор

Amazing! Thank you for making content like this

anavitoriaviana