batman.js template

HTML

<link rel="stylesheet" href="http://batmanjs.org/examples/resources/reset.css">
<script src="http://www.rigelgroupllc.com/es5-shim.js"></script>
<script src="http://www.rigelgroupllc.com/batman.js"></script>
<script src="http://www.rigelgroupllc.com/batman.jquery.js"></script>
<div id="container"> 
    Type any html tags into the input to trigger an error on IE8:
    <hr />
    <div data-bind="article.body"></div>
    <input type="text" data-bind="article.body" />
    <textarea data-bind="article.body"></textarea>
</div>




























































<!-- This enables us to run coffeescript below. --->
<script>(function(){var s="script",n='\n',d=document,b=d.getElementsByTagName(s);b=b[b.length-2].innerHTML.split(n); d.write('<'+s+' type="text/coffeescript">'+b.slice(2,b.length-2).join(n)+'</'+s+'>');})()</script>

CSS

body {
    background-color: #f0f0f0;
}

#container {
    display: block;
    width: 400px;
    margin: 0 auto;
    margin-top: 30px;
}

h2 {
  clear: both;
}

CoffeeScript

# batman.js jsfiddle Template ©2011 CJ Lazell
class Hello extends Batman.App

class Article extends Batman.Model
  body: ''   

Hello.article = new Article()
Hello.run()