I have a bookmarklet which creates a UI for the user to interact with. Currently, I have been using $('<element>').addClass().css({..});
, but that becomes hard to maintain. Is there a better way to do this?
I have also tried doing something like
var html = "<div class='someclass'>";
html += "<more html/>";
html += "</div>"
Which is also incredibly hard to maintain. Is there a way I can write html within javascript, or a library like jade that i can use WITHIN a javascript bookmarklet?
%somestuff
", myvar) and %somestuff is replaced with myvar. I just want to write markup. – Stephen K May 21 '13 at 20:11