I have a bootstrap 3 modal's html in a variable (in-memory), eg:
var modalHTML = "<div class='modal'>...etc...</div>"
(Wondering why? because it was generated from a Handlebars.js template)
I don't want to append that piece of html to the DOM, because I would have to care about repeated id's, etc, etc.
I want to modalize that piece of html.
In bootstrap 3 one modalizes this way:
$("#foo").modal();
Question is: Can I modalize my piece of html?
Of course I tried this but doesn't work:
modalHTML.modal();
Edit with real code:
var place = {...}
var template = Handlebars.compile($("#place-modal-template").html());
template(place).modal();