JQuery: How to clone autocomplete fields?

前端 未结 2 1197
难免孤独
难免孤独 2021-01-21 06:19

I am using Jörn Zaefferer\'s jquery autocomplete plugin, and I can\'t seem to figure out how to make it work when I clone an autocomplete field. It almost works, in that the clo

2条回答
  •  不知归路
    2021-01-21 07:24

    first of all:

    $newParticipant.children("div").children(":input").length == 0
    

    so there is no children returned by this line. Use

    $newParticipant.children()
    

    instead. It returns 1 chield instead. But steel don't work for me. Have to think more.

提交回复
热议问题