jquery append div inside div with id and manipulate

后端 未结 4 969
轻奢々
轻奢々 2021-02-04 00:08

after 2 hours of searching I decided to ask my question.

I have a div:

I want to add a div inside th

4条回答
  •  遇见更好的自我
    2021-02-04 00:37

    It's just the wrong order

    var e = $('
    '); $('#box').append(e); e.attr('id', 'myid');

    Append first and then access/set attr.

提交回复
热议问题