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
You answered yourself already.
EDIT: deleted wrong sample.
Or there is another option, you can put the HTML right into the current html inside of hidden div like this:
12
And then in jquery, you can read it:
var elements = $("#hiddenContainer").html()