ContentShareA jQuery Plugin which lets you Share what you Like

Why you will ♥ it - First of its Kind!

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 the <meta> tags. By default, it supports Facebook and Twitter but you can add more networks easily.

Demo - Select some Content you Like is India's first open source software and freeware publishing site, Download and Upload Open source software and Freeware relevant to the Paid ones for PC,Mac and Linux.

It also makes its own Cloud Applications for making tasks easy. Recently it has launched a new Plugin Showcase too.


Now whether you want to share the entire page or just a part of it, depends on you!


Getting Started

Four files are required for this plugin to work but not even a single line of code, just include them within the <head> tag and you are done!

     // 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>


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

NOTE: The above code can be found at the end of contentshare.js file. You can do your modifications in the highlighted line (Line No.3)


Variable Description Default Value Valid Values
Array of Links to the Icons which appear in the Tooltip ["img/fb.png","img/tw.png"] Array of Links, the links can be absolute or relative
Array of Share Links belonging to different Social Networks See Facebook's Sharer or Feed Dialog and Twitter's Intent See Facebook's Sharer or Feed Dialog and Twitter's Intent
Minimum number of characters to be selected for this plugin to work 5 Any Number
Clicking on any one of the social links opens in a new tab true Either true or false
The name of the class which is used by the plugin contentshare Any String which obeys W3 Standards for class names
Animation used to display your tooltip grow fade, grow, swing, slide, fall


Here are some tips to elegantly play with the plugin →

1) You can change the colour of the selected text by adding a simple CSS Rule for <mark> tag like:


2) You can even add more social networks or replace the existing ones by defining your own default settings as:

$.fn.contentshare.defaults = {
    shareIcons : ["img/icon1.png" , "img/icon2.png"],
    shareLinks  : ["" , ""]

3) This plugin uses Tooltipster Plugin for tooltips so for styling the tooltip you can refer the doc for Tooltipster


Download the zip file directly or mess with the code @github

Download   Go to GitHub

About Developer

Hey folks, I am Ram, Developer & Designer at I enjoy experimenting & making Web Applications, Plugins, Software for computers, etc. in my leisure time and this plugin is one of the upshot. To stay updated about my developments you can subscribe @email, like @fb, or follow @twitter.


blog comments powered by Disqus