-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
65 lines (53 loc) · 2.68 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
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html>
<head>
<title>shareIt.js</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="scripts/jquery.shareIt.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#si_facebook').shareIt({
share : "facebook",
img : "http://jquery.com/jquery-wp-content/themes/jquery.com/i/try-jquery.png",
title : "jQuery write less, do more.",
description : "jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.",
link: "http://jquery.com/"});
$('#si_twitter').shareIt({
share : "twitter",
title : "jQuery write less, do more.",
link : "http://jquery.com/"});
$('#si_pinterest').shareIt({
share : "pinterest",
img : "http://jquery.com/jquery-wp-content/themes/jquery.com/i/try-jquery.png",
title : "jQuery write less, do more.",
link : "http://jquery.com/"});
});
</script>
</head>
<body>
<h1>shareIt.js</h1>
<p>shareIt.js is a jQuery plugin that offers a quick and easy way to genreate share URL's for facebook, Twitter, and Pinterest. It uses minimal HTML markup as all that is required is an link tag.</p>
<h3>1. Markup</h3>
<p>The markup is a simple a creating link tags.</p>
<pre>
<a href="" id="facebook"> ... Link text/image ... </a>
<a href="" id="twitter"> ... Link text/image ... </a>
<a href="" id="pinterest"> ... Link text/image ... </a>
</pre>
<h3>2. JavaScript</h3>
<p>The markup is a simple a creating link tags.</p>
<pre>
$('#si_facebook').shareIt(
share : "facebook", // needs to be set to facebook, twitter, or pinterest
img : "", // absolute image path
title: "", // title of shared item
description: "", // description of shared item
link: "" // link to shared item
);
</pre>
<p>Share this Plug-in</p>
<a href="" id="si_facebook"><img src="images/facebook.jpg" alt="facebook"></a>
<a href="" id="si_twitter"><img src="images/twitter.jpg" alt="twitter"></a>
<a href="" id="si_pinterest"><img src="images/pinterest.jpg" alt="pinterest"></a>
</body>
</html>