Ractive.js with Bootstrap example

HTML

<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="http://cdn.ractivejs.org/edge/ractive.js"></script>
<div id='container'></div>


<script id="templateOne" type="x-template">
    {{>aPartial}}
</script>

JavaScript

var ractive = new Ractive({
    template: '#templateOne',
    partials: {
        aPartial: '<div>Oh look, the partial is rendered!</div>'
    }
});
function cb() {
    alert('but now we unrender');
    ractive.once('complete', function() {
        alert('we rendered again, and now you can\'t see the partial content');
    });
    ractive.render('container');
}

//ractive.partials.part = '<div>this is a partial</div>';
ractive.render('container');
ractive.once('complete', function() {
    alert('so we render the first time, and you can see the partial');
    ractive.unrender().then(cb);    
});