jQuery changing the id attribute of all the children

前端 未结 3 1703
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-18 05:54

I need some help figuring out how to write some jQuery code.

I need to clone a table dynamically onclick. but then I need to change the ids of the table and its chil

3条回答
  •  失恋的感觉
    2021-01-18 06:41

    $("#table1").find(*)
    

    should be

    table.find("*")
    

    $("#table1") will not return anything on that line of code as you have not yet added the table to the DOM. And * is a selector which should be a string.

提交回复
热议问题