JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min.js"></script>
<body>
<div id="container"><div id="test">test</div></div>
<hr>
<section id="todoapp">
<header id="header">
<h1>Todos</h1>
<input id="new-todo" placeholder="What needs to be done?" autofocus>
</header>
<section id="main">
<ul id="todo-list"></ul>
</section>
</section>
<div>
</div>
JavaScript
$(function (){
var test = {};
test.View = Backbone.View.extend({
el: 'body',
initialize: function (){
this.input = $('#new-todo');
},
events: {
'keyup #new-todo': 'check'
},
check: function (){
console.log('!');
$('#test').html(this.input.val());
}
});
test.view = new test.View();
});