JSFiddle - React, Tailwind, and code Playground

by Ozren Tkalčec Krznarić

HTML

<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.0.0/backbone-min.js"></script>
<p style="height: 100px" />
<div id="testid"></div>

JavaScript

var ListView = Backbone.View.extend({
    el: $("#testid"),
    
    initialize: function () {
        // fixes loss of context for 'this' within methods
        //_.bindAll(this, 'render'); 
        this.render();
    },
    
    render: function () {
        $(this.el).append("<span>hello!</span>");
    }
});

var lv = new ListView();