JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://cdnjs.cloudflare.com/ajax/libs/jade/0.27.7/jade.min.js"></script>
<div id="example1"></div>
CSS
h1 { font-size:1.4em; font-weight:bold; margin:0.2em 0; }
.green, .be { color:green; }
#will { text-decoration:underline; }
JavaScript
jQuery(function($) {
$('#example1').jade('h1.green Example 1');
$('#will.be created').jade().appendTo('body');
});
$.fn.jade=function(source) {
if (this.length && source) {
return this.each(function() {
$(this).html(jade.compile(source)());
});
}
return $(jade.compile(this.selector)());
};