I would like to create a DOM node, set the \'id\' attribute and then append it to \'body\'. The following seems not to work because jQuery doesn\'t see my template as an obj
var template = $( "", { id: "1234", html: $( "", { class: "bar", text: "bla" } ) }); $('body').append(template); What about this? 0 讨论(0) 查看其它6个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
What about this?