I have many elements that one of my JS widgets needs to create and add to the DOM often. They never change.
So one option would be to store the HTML itself as a stri
If you are looking for performance I would stick with the first version because in the second one everytime you are calling $('') or $('') you are creating a new jQuery Object and then call .append() which also another method call you do. I would go with the first one. 0 讨论(0) 查看其它5个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
$('') or $('') you are creating a new jQuery Object and then call .append() which also another method call you do. I would go with the first one. 0 讨论(0) 查看其它5个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
$('') you are creating a new jQuery Object and then call .append() which also another method call you do. I would go with the first one. 0 讨论(0) 查看其它5个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
.append()