JSFiddle - React, Tailwind, and code Playground

by Alex Saskevich

HTML

<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="http://underscorejs.ru/underscore-min.js"></script>
<script src="http://backbonejs.ru/backbone-min.js"></script>
<a href="#/label/1">id 1</a>
<a href="#/label/2">id 2</a>

JavaScript

var AppRouter = Backbone.Router.extend({
    routes: {
        "label/:id": "getLabel",
    }
});
var app_router = new AppRouter;
app_router.on('route:getLabel', function (id) {
    alert("Going to #/label/:id, where :id = " + id);
});
Backbone.history.start();