JQuery: How to clone autocomplete fields?

前端 未结 2 1194
难免孤独
难免孤独 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:20

    Make

    $newParticipant = $("#template").clone(true);
    

    like so

    $newParticipant = $("#template").clone();
    

    Your example works for me in FF when you don't clone events on #template.

提交回复
热议问题