JSFiddle - React, Tailwind, and code Playground

by nikoshr

HTML

<script src="http://documentcloud.github.io/underscore/underscore-min.js"></script>
<script src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
<script type="text/template" id="someTemplate">
    <div><%= text %></div>
    <div class='recaptcha'></div>
</script>
    
<div id='render'>
    
</div>

JavaScript

var src = $('#someTemplate').html();
var pubkey = '6Ld_DeMSAAAAALRwXseeSYrJbu9d5YtXUJBFaOCt';

var compiled = _.template(src);
var html = compiled({
    text: 'in div'
});
var $el = $('#render').append(html);
$el.find('.recaptcha').each(function(idx, el) {
    Recaptcha.create(
        pubkey,
        el
    );
});