0.0.3 • Published 8 years ago

simple-share-buttons v0.0.3

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

Simple Share Button

Simple Share Button is a simple javascript function to share you content.

Installation

Download zip files

Download ZIP files here and unzip it in your project.

Use bower

You can use bower to install the plugin.

bower install --save simple-share-button

After that, reference the JavaScript file:

<script src="bower_components/simple-share-button/src/share-button.js"></script>
<!-- OR -->
<script src="your_library_folder/simple-share-button/src/share-button.js"></script>

Use NPM

npm i simple-share-buttons -S
const share = require('simple-share-buttons');

Usage

To use it, use the following markup:

<a href="your_link" class="btn-share" data-social="twitter">Share on Twitter</a>
<button class="btn-share" data-url="your_link" data-social="twitter">Share on Twitter</button>
data attributesRoleComment
data-socialName of social networkrequire
data-urlUrl of the page to sharenot require - If is not specify, the current page url is used
data-viaYour usernamenot require - Just for Twitter

List of available social network

  • facebook
  • twitter
  • pinterest
  • linkedin
  • google plus

If you want new social network or more options, make a pull request.

TO-DO

  • Add demo page
  • Add more social networks
0.0.3

8 years ago

0.0.2

8 years ago