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

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

Posted on

This time I will share jQuery Plugin and tutorial about jQuery Plugin To Generate Custom Social Share Links – sharing.jquery.js, hope it will help you in programming stack.

jQuery Plugin To Generate Custom Social Share Links sharing jquery js - Download jQuery Plugin To Generate Custom Social Share Links - sharing.jquery.js
File Size: 4.64 KB
Views Total: 2688
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.

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

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

1 <a href="#" class="tw">Share on Twitter</a>
2 <a href="#" class="fb">Share on Facebook</a>
3 <a href="#" class="pt">Share on Pinterest</a>
4 <a href="#" class="ln">Share on LinkedIn</a>
5 <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.

1 $(".tw").sharing("<a href="https://www.jqueryscript.net/tags.php?/twitter/">twitter</a>");
2 $(".fb").sharing("facebook");
3 $(".pt").sharing("pinterest");
4 $(".ln").sharing("linkedin");
5 $(".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.

source : jqueryscript.net