Skip to content Skip to sidebar Skip to footer

Jquery: How To Clone Autocomplete Fields?

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 cloned

Solution 1:

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.

Solution 2:

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.

Post a Comment for "Jquery: How To Clone Autocomplete Fields?"