![goodshare.js logo github](http://goodshare.ru/assets/images/goodshare-logo-github.jpg)
goodshare.js
Useful jQuery plugin modern JavaScript solution that will help your website visitors share a link on social networks and microblogs or mobile messengers. Easy to install and configuring on any of your website!
Warning! Since 4.0.0
we don't support old jQuery versions of goodshare.js
. Thank you jQuery, but ES6 is better and cleaner.
Features
Simple install, extensive documentation, developer support, SEO friendly, many options for customization of appearance, clean code without scripts tracking user activity on the page, high speed.
Install via npm
(recommended)
$ npm install goodshare.js
Old way to install
Download goodshare.min.js and place file to your project template (before close body
tag):
<script src="/path/to/goodshare.min.js"></script>
List of supported social networks and microblogs
Note: If you don't see your social network, please let us know and we'll try to add it!
For iOS/Android mobile devices
Description
Plugin works with any HTML tags: <a>
or <div>
or <button>
or other. So you can choose any and add required attributes data-social
. For example:
<button data-social="twitter">Share this to Twitter</button>
<a href="#" data-social="facebook">Share this to Facebook</a>
<div data-social="linkedin">Share this to LinkedIn</div>
<i class="icon-google-plus" data-social="googleplus"></i>
Note for <a>
links
We use event.preventDefault()
for event «click». So don't be afraid to use links like this:
<a href="#" data-social="...">My link</a>
Counters
To display counter, just add data-counter
attribute to HTML element that will contain numbers. For example:
<a href="#" data-social="facebook">
Share this to Facebook
<span data-counter="facebook"></span>
</a>
Note: You also may put this attribute to any element.
Value of data-counter
attribute, see in this list of supported social networks and microblogs:
Note: Google Plus
, Surfingbird
, StumbleUpon
, Pocket
and Xing
counters use Yahoo Query Language (YQL). It may impose some restrictions on use, associated with limit queries to Yahoo (we try to find another solution for this, if you know — write issue to us).
Simple solution for single domain: http://opensharecount.com
Note: We're not authors of the web site opensharecount.com, if something not working — write to their support please!
Example
This example shows one of decoration options with all supported social networks.
![goodshare.js usage example github](http://goodshare.ru/assets/images/goodshare-usage-example-github-ver11.png)
Developers
Development and maintenance of goodshare.js
project engaged by Vikky Shostak (Koddr). If you want to write a «thank you» or ask us about something, use this e-mail.
Your help
If you want help, we will be glad reviews about goodshare.js
on personal blogs (including Twitter), online media and/or specialized IT-portals. Thank you!
License
The MIT License (MIT)