jquery clone combo box not able to function

后端 未结 2 1387
[愿得一人]
[愿得一人] 2021-01-28 18:47

I have the following table where when I press the first button I call a jquery to clone the first row and add a new row.

2条回答
  •  星月不相逢
    2021-01-28 19:20

    I tried your code in my machine and it worked perfectly. Perhaps your problem lies with the bootstrap combo box. So try refresh or reset the bootstrap combo box.

    I have used a similar plugin and had a similar problem. So I used this and it solved my problem.

    $("#select").selectpicker('refresh');
    

    Also i found a small error in your above pasted code.

    
    

    instead it was like

    id='addRow()'
    

    So here is the updated code with chosen plugin.

    
    
        
No. Sel Desc.

Hope this helps.

I added the code inside the javascript itself instead of the clone function. In this way it will be easier for you to maintain the count and keep adding the naming conventions to your fields.

提交回复
热议问题