forked from biks152207/urlToLink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
27 lines (25 loc) · 1006 Bytes
/
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
<!DOCTYPE html>
<html>
<meta charset=utf-8>
<title>URL To Link</title>
<style>p { width: 500px; }</style>
<h1>URL To Link Example</h1>
<p>Lorem ipsum dolor é sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation http://loremipsum.com ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. <a href="http://loremipsum.com">Excepteur sint</a> occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum. https://bbc.co.uk</p>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="jquery.urlToLink.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('a').bind('click', function(e){
e.preventDefault();
alert('CLICK!');
});
$('p').urlToLink({
target : '_blank'
});
});
</script>