jQuery Plugin To Generate Custom Social Share Links - sharing.jquery.js

jQuery Plugin To Generate Custom Social Share Links - sharing.jquery.js
File Size: 4.64 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

sharing.jquery.js is a minimalist jQuery social sharing plugin which allows to easily share your links on various social networks: Facebook, Twitter, Pinterest, Google Plus and Linkedin.

How to use it:

1. Place jQuery library and the jQuery sharing.jquery.js plugin at the bottom of the html page.

<script src="//code.jquery.com/jquery-1.12.1.min.js"></script>
<script src="sharing.jquery.js"></script>

2. Create social share links and specify the urls you want to share using href attribute.

<a href="#" class="tw">Share on Twitter</a>
<a href="#" class="fb">Share on Facebook</a>
<a href="#" class="pt">Share on Pinterest</a>
<a href="#" class="ln">Share on LinkedIn</a>
<a href="#" class="gp">Share on Google+</a>

3. Active the social share links. It will popout a new social share window when you click on links.

$(".tw").sharing("twitter");
$(".fb").sharing("facebook");
$(".pt").sharing("pinterest");
$(".ln").sharing("linkedin");
$(".gp").sharing("googleplus");

This awesome jQuery plugin is developed by spacek. For more Advanced Usages, please check the demo page or visit the official website.