-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
53 lines (37 loc) · 1.34 KB
/
index.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
<!DOCTYPE HTML>
<html>
<head>
<title> Twitter Emojii Everywhere DEMO</title>
<!-- Using Elle Kasai css as cheat sheet to include emoji as class-->
<link rel="stylesheet" type="text/css" href="twemoji-awesome.css">
</head>
<body>
<h4>Sample Emojii with codes</h4>
🎹 - <code>&#x1F3B9;</code><br/>
🏁 - <code>&#x1F3C1;</code>
<h4>Using twemoji-awesome CSS</h4>
<i class="twa twa-heart"></i> - <i>twa-heart</i> <br/>
<i class="twa twa-lg twa-sparkles"></i> - <i>twa-sparkles</i> <br/>
<i class="twa twa-2x twa-hatching-chick"></i> - <i>twa-hatching-chick</i><br/>
<h4>Appending Emoji from script </h4>
<div id="emo"></div>
<!-- CDN for twiter Emoji-->
<script src="http://twemoji.maxcdn.com/twemoji.min.js"></script>
<script type="text/javascript">
/*Using parse method for the Emoji*/
twemoji.parse('I \u2764\uFE0F emoji!');
var div = document.createElement('div');
div.textContent = 'I \u2764\uFE0F emoji!';
//document.body.appendChild(div);
document.getElementById("emo").appendChild(div);
twemoji.parse(document.body);
var img = div.querySelector('img');
// note the div is preserved
img.parentNode === div; // true
img.src; // abs.twimg.com/emoji/v1/36x36/2764.png
img.alt; // \u2764\uFE0F
img.class; // emoji
img.draggable; // false
</script>
</body>
</html>