JSFiddle - React, Tailwind, and code Playground

by ethagnawl

JavaScript

$(function () {
var Foo = Backbone.View.extend({
    events: {
        'click .test': function () {this.alert()}
    },
    template: function () { return '<a class="test">test</a>' },
    render: function () {
        this.$el.html(this.template())
        $('body').append(this.$el)    
    },
    alert: function () { alert('foo') }
})

var view = new Foo();

view.render()
})