jQuery Plugin To Create Custom Social Share Buttons - goodshare.js

jQuery Plugin To Create Custom Social Share Buttons - goodshare.js
File Size: 14.6 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

goodshare.js is a lightweight jQuery plugin used to generate different types of social share buttons using Html5 data attributes. Currently supports VK, Facebook, Twitter, LiveJournal, Google Plus, Linkedin, Tumblr, Blogger, Pinterest, Digg, Evernote, Yandex, Reddit, Pocket, XING, Viber, Telegram, Wordpress, WhatsApp, LINE, Delicious, Weibo, Renren, Baidu and Odnoklassniki.

How to use it:

1. Choose a color scheme for your social share buttons.

<link href="templates/goodshare-color.min.css" rel="stylesheet">
<!-- <link href="templates/goodshare-dark.min.css" rel="stylesheet"> -->
<!-- <link href="templates/goodshare-light.min.css" rel="stylesheet"> -->
<!-- <link href="templates/goodshare-smooth.min.css" rel="stylesheet"> -->

2. Add social share links into a container and pass the options via HTML5 data-OPTION attributes as follow.

<div class="goodshare-color">
  <a href="#" class="goodshare" data-type="vk">VK</a> 
  <a href="#" class="goodshare" data-type="fb">Facebook</a> 
  <a href="#" class="goodshare" data-type="tw">Twitter</a> 
  <a href="#" class="goodshare" data-type="lj">LiveJournal</a> 
  <a href="#" class="goodshare" data-type="ok">OK</a> 
  <a href="#" class="goodshare" data-type="mr">MR</a> 
  <a href="#" class="goodshare" data-type="gp">Google+</a> 
  <a href="#" class="goodshare" data-type="li">LinkedIn</a> 
  <a href="#" class="goodshare" data-type="tm">tumblr</a> 
  <a href="#" class="goodshare" data-type="pt">Pinterest</a> 
  <a href="#" class="goodshare" data-type="bl">Blogger</a> 
  <a href="#" class="goodshare" data-type="di">Digg</a> 
  <a href="#" class="goodshare" data-type="en">Evernote</a> 
  <a href="#" class="goodshare" data-type="yz">YZ</a>
  <a href="#" class="goodshare" data-type="rd">Reddit</a>
</div>

3. All the options.

// social networks & blog platforms
type: 'vk',

// url to share
url:  location.href,

// title to share
title:  document.title,

// image to share
image:  $('meta[property="og:image"]').attr('content'),

// text to share
text: $('meta[name="description"]').attr('content')

Change logs:

2016-11-07

  • v3.2.9

2016-09-12

  • Fix Facebook link & counter

2016-03-28

  • Add Baidu share link

2016-03-27

  • Add Weibo and Renren share links

2016-01-19

2015-11-21

  • Add WordPress share link, off Twitter share count

2015-10-30

  • Add Viber (http://viber.com), Telegram, WhatsApp, LINE share link

2015-10-22

  • Fix Pinterest share link

2015-10-21

  • Added xing.com.

2015-10-16

  • Fix conflict with VK.Widget, refactoring

2015-10-05

  • Add Delicious and Instapaper share links

2015-10-04

  • Update getCount() function

2015-09-26

  • Add new function existCount(), refactoring

2015-09-25

  • Add Pocket share counter
  • Fix StumbleUpon count when '0'

2015-09-24

  • Update goodshare.js

2015-09-17

  • Fix Facebook count when '0'

2015-09-15

  • Add counters for LinkedIn, Pinterest and Tumblr.
  • Add Pocket support.

2015-02-28

  • Add reddit.com

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