Apply jQuery autocomplete to cloned element

后端 未结 2 1916
攒了一身酷
攒了一身酷 2021-01-13 21:15

I am using jQuery autocomplete which is working fine with existing element but not with dynamically added element.

Here is my autocomplete code (Which I have chang

2条回答
  •  轮回少年
    2021-01-13 21:48

    You can use 'live', although these days you should be using the 'on' method.

    See this thread for working examples (including one that uses 'on' if you drill down in to some of the hidden answers): Bind jQuery UI autocomplete using .live()

    Cheers Matt

提交回复
热议问题