Search on Click with Jquery's Autocomplete

后端 未结 5 2010
自闭症患者
自闭症患者 2021-02-14 04:20

I am trying to simulate the Youtube Autocomplete Search experience.

I can\'t find the option when the viewer clicks on a listed item and is automatically proceeded to se

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-14 04:53

    Can't you just do something like:

    $('.autocomplete ul li').live("click", function() {
      $("form#search").submit();
    });
    

    Where the click event on your option list triggers a form submit for your search form??

提交回复
热议问题