This repository has been archived by the owner on Dec 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdemo.html
61 lines (54 loc) · 1.83 KB
/
demo.html
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
57
58
59
60
61
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>jEmotion Demo</title>
<script type="text/javascript" src="jquery-1.6.3.min.js"></script>
<script type="text/javascript" src="jQuery.jEmotion.js"></script>
<script type="text/javascript">
$(function() {
$('#question').jEmotion({
handler: '.emotion', //表情按钮
imagePath: 'images/', //图片路径
converts: 'div' //载入页面时候这个选择器中的元素会被替换表情图片
});
});
</script>
</head>
<body>
<h1>jEmotion Demo</h1>
<div>a(#偷笑)(#怒)b(#左哼哼)(#泪)c(#左哼哼) [左边的文本将会被转换成表情]</div>
<textarea id="question" style="width:600px;height:180px;" placeholder="Write here"></textarea>
</br>
<span style="text-decoration:underline;cursor:pointer;" class="emotion">Add a emotion</span>
<span>(左边这个触发按钮如果使用 a 的话,会造成IE6截断http连接,不能正确读取Ajax图片,推荐使用span来模拟a)</span>
</br>
<input type="submit"/>
<hr/>
<fieldset>
<legend>使用方法</legend>
<pre>
$(function() {
$('#question').jEmotion({
handler: '.emotion', //表情按钮
imagePath: 'images/', //图片路径
converts: 'div' //载入页面时候这个选择器中的元素会被替换表情图片
});
});
</pre>
</fieldset>
<hr/>
<dl>
<dt>@version</dt>
<dd>0.3</dd>
<dt>@author</dt>
<dd><a href="http://log4d.com">http://log4d.com</a></dd>
<dt>@website</dt>
<dd><a href="http://log4d.com/2011/11/jemotion">http://log4d.com/2011/11/jemotion</a></dd>
<dt>@demo</dt>
<dd><a href="http://lab.log4d.com/javascript/jEmotion/demo.html">http://lab.log4d.com/javascript/jEmotion/demo.html</a></dd>
<dt>@source</dt>
<dd><a href="https://github.com/alswl/jEmotion">https://github.com/alswl/jEmotion</a></dd>
</dl>
</body>
</html>