ContentShare is a jQuery plugin which lets you share the exact content on a page which you actually want to share. It enables you to share selected text on your social network rather the default text specified in thetags. By default, it supports Facebook and Twitter but you can add more networks easily.
Usage
<html>
<head>
// css file for tooltip
<link rel="stylesheet" type="text/css" href="tooltipster.min.css"/>
// jquery library
<script src="jquery-1.8.3.min.js"></script>
// tooltip plugin
<script type="text/javascript" src="jquery.tooltipster.min.js"></script>
// our awesome ContentShare plugin
<script src="contentshare.js"></script>
</head>
</html>
ContentShare by default works on the text within
p
tags. So, if you are okay with this then you can skip this part. To customize, you can specify any element via CSS/jQuery Selectors and pass it while calling the plugin like:
// calling the plugin on DOM ready
$(document).ready(function(){
$("p").contentshare();
$.fn.contentshare.defaults.shareable.on('mouseup',function(){
$.fn.contentshare.showTooltip();
});
});
Website