Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 49 lines (37 sloc) 1.279 kb
3a9d462 @worrydream ...
authored
1 <!DOCTYPE html>
2 <html>
3 <head>
dbd70ff @worrydream futzing with tabs
authored
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5 <title>Tangle document</title>
6
7 <!-- Tangle -->
8 <script type="text/javascript" src="Tangle.js"></script>
9
10 <!-- TangleKit (optional) -->
11 <link rel="stylesheet" href="TangleKit/TangleKit.css" type="text/css">
12 <script type="text/javascript" src="TangleKit/mootools.js"></script>
13 <script type="text/javascript" src="TangleKit/sprintf.js"></script>
14 <script type="text/javascript" src="TangleKit/BVTouchable.js"></script>
15 <script type="text/javascript" src="TangleKit/TangleKit.js"></script>
16
17 <!-- example -->
18 <script type="text/javascript">
19
20 function setUpTangle () {
21
22 var element = document.getElementById("example");
23
24 var tangle = new Tangle(element, {
25 initialize: function () {
26 this.cookies = 4;
27 this.caloriesPerCookie = 50;
28 },
29 update: function () {
30 this.calories = this.cookies * this.caloriesPerCookie;
31 }
32 });
33 }
34
35 </script>
3a9d462 @worrydream ...
authored
36 </head>
37
403001f @worrydream ...
authored
38 <body onload="setUpTangle();">
3a9d462 @worrydream ...
authored
39
dbd70ff @worrydream futzing with tabs
authored
40 <p>This is a simple reactive document.</p>
3a9d462 @worrydream ...
authored
41
dbd70ff @worrydream futzing with tabs
authored
42 <p id="example">
43 When you eat <span data-var="cookies" class="TKAdjustableNumber" data-min="2" data-max="100"> cookies</span>, you
44 will consume <span data-var="calories"></span> calories.
45 </p>
3a9d462 @worrydream ...
authored
46
47 </body>
48 </html>
Something went wrong with that request. Please try again.