jQuery Share Plugin
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Shares</title>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="js/jquery.shares.js"></script>
<script>
$(function() {
$('a').each(function() {
$(this).shares({
counts: $(this).next()
});
});
});
</script>
</head>
<body>
<div>
<a href="http://www.nba.com" data-shares="facebook">NBA to Facebook</a>
<span></span>
</div>
<div>
<a href="http://www.ebay.com/" data-shares="twitter">eBay to Twitter</a>
<span></span>
</div>
<div>
<a href="http://www.bestbuy.com/" data-shares="google">Bestbuy to Google Plus</a>
<span></span>
</div>
<div>
<a href="http://www.espn.com/" data-shares="pinterest" data-image="http://a.espncdn.com/photo/2014/0327/nfl_divisional1_288x75.jpg">ESPN to Pinterest</a>
<span></span>
</div>
</body>
</html>
data-shares
- social network typedata-image
- default image, only for Pinterest now
counts
- this is the share count number request option, if the api has service, it will apear the number in the target you ask
- Twiiter
- Google Plus