forked from AnSavvides/jquery.linky
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathexamples.html
55 lines (51 loc) · 1.76 KB
/
examples.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>jQuery Linky Examples</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="url">
https://github.com/AnSavvides should turn into a link, while <a href="https://twitter.com/andreassavvides">this link should stay untouched</a>.
</div>
<div class="twitter-mentions">
@andreassavvides should get highlighted! Not an e-mail such as hello@example.com though.
</div>
<div class="instagram-mentions">
We do instagram too! Check out @instagram!
</div>
<div class="hashtags">
Need hashtags linkified? Don't worry - #wegotyoucovered!
</div>
<div class="github-mentions">
You can find @AnSavvides on GitHub!
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="jquery.linky.js"></script>
<script>
$(".url").linky();
$(".twitter-mentions").linky({
mentions: true,
urls: false,
linkTo: "twitter"
});
$(".instagram-mentions").linky({
mentions: true,
urls: false,
linkTo: "instagram"
});
$(".hashtags").linky({
hashtags: true,
urls: false,
linkTo: "twitter"
});
$(".github-mentions").linky({
mentions: true,
linkTo: "github"
});
</script>
</body>
</html>