-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
56 lines (41 loc) · 1.69 KB
/
index.html
File metadata and controls
56 lines (41 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<title>kudelabs.com: Javascript Binding Example</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("prototype", "1.6.0.2");
google.load("scriptaculous", "1.8.1");
</script>
<link href="js_bind_example.css" rel="stylesheet" type="text/css" />
<script src="js_bind_example.js" type="text/javascript"></script>
</head>
<body>
<div id="frame">
<div class="menu"><a href="index_cn.html">中文版/Chinese Version</a></div>
<p>This is an example of applying the correct binding in Javascript to solve a real-world
problem. The correct use of binding allows us to create a self contained JS object
that handles all aspects of our new UI Element, the <code>FancyEditor</code>.</p>
<div id="holder" >
<div class="off">
<span class="display">Click To Edit!</span>
<div class="tip">[ Click this box to edit the text. ]</div>
</div>
<div class="on" style="display:none">
<input class="text" type="text" value="Type Something" />
<input class="save" type="submit" name="commit" value="Thanks!" />
</div>
</div>
</div>
<script type="text/javascript">
//<![CDATA[
// this creates our object and setup up the triggers
// we could easily expand this to something like
// $$('li.editable_item').each(function(elem){new FancyEditor(elem);})
new FancyEditor('holder');
//]]>
</script>
</body>
</html>