Easy Social Share Buttons with Counters Using jQuery - easyShare

File Size: 19.9 KB
Views Total: 13590
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Easy Social Share Buttons with Counters Using jQuery - easyShare

easyShare is a minimal jQuery plugin used to integrate custom social media buttons with counters into your web page.

Gives your social share buttons a nice new looking and without having to include vendors' Javascript APIs. Currently supports Facebook share, Pinterest, XING, Linkedin, Twitter tweet and Google Plus +1.

Licensed under the GPL.

How to use it:

1. Include the Font Awesome 4 for scalable social icons.

<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

2. Include the jQuery library and the jQuery easyShare plugin's files.

<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="jquery.kyco.easyshare.min.js"></script>

3. Create social media share buttons with counters as follows. Use data-* attributes to specify the social networking services and the webpage URL you wish to share with your friends.

<div data-easyshare data-easyshare-url="https://www.jqueryscript.net/"> 
  <!-- Total -->
  <button data-easyshare-button="total"> <span>Total</span> </button>
  <span data-easyshare-total-count>0</span> 
  
  <!-- Facebook -->
  <button data-easyshare-button="facebook"> <span class="fa fa-facebook"></span> <span>Share</span> </button>
  <span data-easyshare-button-count="facebook">0</span> 
  
  <!-- Twitter -->
  <button data-easyshare-button="twitter" data-easyshare-tweet-text=""> <span class="fa fa-twitter"></span> <span>Tweet</span> </button>
  <span data-easyshare-button-count="twitter">0</span> 
  
  <!-- Google+ -->
  <button data-easyshare-button="google"> <span class="fa fa-google-plus"></span> <span>+1</span> </button>
  <span data-easyshare-button-count="google">0</span>
  <div data-easyshare-loader>Loading...</div>
</div>

Changelogs:

2018-11-02

v1.3.3 (2015-10-24)

  • Remove twitter share count.

v1.3.0 (2015-10-24)

  • Dramatic speed improvements.

v1.3.0 (2015-10-08)

  • Added support for LinkedIn, Pinterest and Xing.

2015-09-26

  • Now fully supports HTTPS with option to toggle protocol.
  • Fix for SHARE_URL.

2015-05-28

  • Fixed default tweet text to "".

2015-05-28

  • Removed the requirement for a referrer to be present.

2015-01-31

  • Added API file. Changed functionality to use the new API file.

2014-12-15

  • Updated share counts to be rounded for large numbers.

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