For example I want to write this JS code
$(document).ready(function() {
var parent = $('#mydiv');
var data = {somekey: 'Hello world!'};
parent.append(zen('table>tr>td.someClass{somekey}', data));
});
with the following results:
<div id="mydiv">
<table>
<tr>
<td class="someClass">
Hello wolrd!
</td>
</tr>
</table>
</div>
Are there any JS libraries?
here's a jQuery plugin that does what you are locking for: https://github.com/zodoz/jquery-ZenCoding