PageRenderTime 17ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/source/Plug-in/kind/examples/dynamic-load.html

http://prosporous.googlecode.com/
HTML | 43 lines | 43 code | 0 blank | 0 comment | 0 complexity | 9d841f71690625ad5b68c7ba65376e14 MD5 | raw file
 1<!doctype html>
 2<html>
 3	<head>
 4		<meta charset="utf-8" />
 5		<title>Dynamic Load Examples</title>
 6		<style>
 7			form {
 8				margin: 0;
 9			}
10			textarea {
11				display: block;
12			}
13		</style>
14		<script charset="utf-8" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
15		<script>
16			$(function() {
17				var editor;
18				$('input[name=load]').click(function() {
19					$.getScript('../kindeditor-min.js', function() {
20						KindEditor.basePath = '../';
21						editor = KindEditor.create('textarea[name="content"]');
22					});
23				});
24				$('input[name=remove]').click(function() {
25					if (editor) {
26						editor.remove();
27						editor = null;
28					}
29				});
30			});
31		</script>
32	</head>
33	<body>
34		<h3>????</h3>
35		<form>
36			<textarea name="content" style="width:800px;height:200px;"></textarea>
37			<p>
38				<input type="button" name="load" value="??JS??????" />
39				<input type="button" name="remove" value="?????" />
40			</p>
41		</form>
42	</body>
43</html>