Writing HTML layout/template within javascript bookmarklet -
i have bookmarklet creates ui user interact with. currently, have been using $('<element>').addclass().css({..});, becomes hard maintain. there better way this?
i have tried doing like
var html = "<div class='someclass'>"; html += "<more html/>"; html += "</div>" which incredibly hard maintain. there way can write html within javascript, or library jade can use within javascript bookmarklet?
yes, there domain specific language implementation in javascript allow write more expressive html in javascript called pithy.
please remember writing large amounts in pithy maybe not idea , rather want use proper client side templating engine such dustjs or many others.
Comments
Post a Comment