Fetching contributors…
Cannot retrieve contributors at this time
41 lines (32 sloc) 1.07 KB
<!DOCTYPE html>
<meta charset="utf-8" />
<title>Client-side CoffeeKup (Crème)</title>
<!-- jQuery is NOT required, used here for convenience -->
<script src=""></script>
<script src=""></script>
<script src="coffeekup.js"></script>
<script type="text/coffeescript">
stooges = ['moe', 'larry', 'curly']
$().ready ->
stringy = """
h2 'Template as string'
ul ->
for guy in @stooges
li guy
codey = ->
h2 'Template as a function'
ul ->
for guy in @stooges
li guy
$('body').append CoffeeKup.render(stringy, stooges: stooges)
$('body').append CoffeeKup.render(codey, stooges: stooges)
<h1>Client-side CoffeeKup (crème)</h1>
<p>Doing everything on the client. Lots of flexibility but a fatty download.</p>