2

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?

atott
  • 880
  • 10
  • 15

2 Answers2

2

here's a jQuery plugin that does what you are locking for: https://github.com/zodoz/jquery-ZenCoding

lrsjng
  • 2,615
  • 1
  • 19
  • 23
1

Here's a pure js one: https://github.com/Sjeiti/zen. It's really just a wrapper for Emmet (so no unimplemented syntax issues).

Sjeiti
  • 2,468
  • 1
  • 31
  • 33