Filter Search List using JavaScript

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • #JavaScript
    in this tutorial, we will see together how to make a cool filter search list using JavaScript.
    source code for this tutorial
    source code: bit.ly/2YpSt4M

Комментарии • 31

  • @asthapatel5109
    @asthapatel5109 4 года назад +4

    How would I do this with the use of JSON data from an API

  • @Cristian-nk2kd
    @Cristian-nk2kd 3 года назад

    Thank you very much, your explanation helped me for a school assignment.

  • @MegaMagnax
    @MegaMagnax 3 года назад +1

    Helped me a ton !
    Great job !!

  • @baso8941
    @baso8941 2 года назад +1

    What is the difference between the Filter search and Predictive search feature ?

    • @DoctorCode9
      @DoctorCode9  2 года назад

      Predictive search is using technique like ML and AI to give accurate suggestions to user, while filter search is just filtering the results that the user have while he types

    • @baso8941
      @baso8941 2 года назад

      @@DoctorCode9 so they are almost the same?

  • @aasaaasdeqaaalsayarahauto361
    @aasaaasdeqaaalsayarahauto361 3 года назад

    how to hide the list?only shows when you input the same letter

  • @sebastianjorgecruz9664
    @sebastianjorgecruz9664 3 года назад

    finally a solution that worked for me, thank you so much

  • @freshteacher5692
    @freshteacher5692 2 года назад

    how do you add hyperlink?

  • @jessicadesouza3231
    @jessicadesouza3231 4 года назад +1

    How can I do this by using an object array instead of a ul list?

    • @DoctorCode9
      @DoctorCode9  4 года назад

      You can create an array and everytime you add a new item using the button,you can add it to that array using push method

    • @jessicadesouza3231
      @jessicadesouza3231 4 года назад

      doctor code You’re not using a button? Isn’t it a live search?

  • @celermode6291
    @celermode6291 4 года назад

    if I wanted to add a delay in the search filter, what should I do? Thanks

    • @justinoneill2837
      @justinoneill2837 4 года назад

      you would need to use a *debounce()* function
      here's an example with a scrolling page: codepen.io/oneezy/pen/VweEwyp?editors=0011
      function debounce(fn, time = 1000) {
      let timeout = null;
      return function() {
      clearTimeout(timeout);
      timeout = setTimeout( () => {
      fn.apply(this,arguments)
      }, time);
      }
      }
      function scroll() {
      // custom code
      }
      function run() {
      let body = document.querySelector('body');
      body.addEventListener('scroll', debounce(scroll));
      }
      run();

  • @nouha8009
    @nouha8009 4 года назад +1

    I'm in love with your channel :) thx for sharing

    • @DoctorCode9
      @DoctorCode9  4 года назад

      I'm glad that you like our content, and I will try my best to improve my video's quality 😊

    • @Morvi7570
      @Morvi7570 3 года назад

      @@DoctorCode9 thank you for your videos

  • @yassinebenlahbib1058
    @yassinebenlahbib1058 2 года назад

    legend.

  • @gitam-er8ri
    @gitam-er8ri 3 года назад

    how can we hide those lists before searching

  • @TuanBui-mx3pd
    @TuanBui-mx3pd 4 года назад

    good job ma bro
    i luv u so much , you're a my hero
    ur best

  • @saudsayed3436
    @saudsayed3436 3 года назад

    Bro how to make search box who search whole website we able to access 7 page content on 1 page by using search box?
    Plzzz plzzz tell
    👍🏻👍🏻👍🏻......

  • @jussymashunye
    @jussymashunye 4 года назад

    Amazing stuff,thank you so much

  • @mohithreddyvuyyuru
    @mohithreddyvuyyuru 3 года назад

    First, I need to hide the below list. then i want to search

  • @fippon1495
    @fippon1495 4 года назад

    Please create video on Advanced search with javascript

  • @iLLestTv
    @iLLestTv 4 года назад +1

    1:13

  • @ademlabsi6048
    @ademlabsi6048 4 года назад

    you are awsome , hope you complete your lessons of how to make website :] #learn_English_in_on_comment

  • @wranglerxfun3692
    @wranglerxfun3692 4 года назад

    In my computer, it didn't work.. Why?