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?