jQuery autocomplete for dynamically created inputs

后端 未结 2 490
小蘑菇
小蘑菇 2020-11-27 05:48

I\'m having an issue using jQuery autocomplete with dynamically created inputs (again created with jQuery). I can\'t get autocomplete to bind to the new inputs.

2条回答
  •  情歌与酒
    2020-11-27 06:21

    I found that I needed to put teh autocomplete after the append so:

     $tableBody.append(newtr);  
     $('.description', newtr).autocomplete(autocomp_opt);
    

提交回复
热议问题