Jquery Autocomplete for 2 input field (same class)

后端 未结 3 1843
被撕碎了的回忆
被撕碎了的回忆 2021-02-01 07:33

I have two input fields like this:




        
3条回答
  •  滥情空心
    2021-02-01 08:20

    Very nice solution with respect to:

    .each(function() {
        $(this).data('autocomplete')._renderItem = function(ul, item) {
            //...
        };
    });
    

    The purpose of calling auto-complete with the same class is when you want to have the same help list to show up in several similar fields.

提交回复
热议问题