I have a big piece of code that needs to be inserted into DOM at some point. The code also contain some variables:
<ul id="info'+value+'" class="info"><li class="hide"></li><li class="lock"><ul>
// just a piece of the code with variable "value"
Right now I am doing:
var codeToInsert = "<some code/>"
codeToInsert.insertAfter('#someID');
Is there a better way to do it from the performance point of view?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…