data-social-share-click

0.0.5 • Public • Published

data-social-share-click

Share current page url across social networks. No more.

No icons, no CSS, no UI, no effects, no dependencies.

Install

Node

npm install data-social-share-click --save

Usage

Javascript

import DataSocialShareClick from "data-social-share-click";
let socialShares=new DataSocialShareClick();
socialShares.listenClicks();

Html

<button data-social-share-click="facebook">Facebook</button>
<button data-social-share-click="twitter">Twittet</button>
<button data-social-share-click="googlePlus">G+</button>
<a href="#" data-social-share-click="linkedIn">LinkedIn</button>

##What does it do?

When the script is included, it listens for click events on document. When a click occurs on element with data-social-share-click="facebook" attribute, it will open a Facebook share popin to share the current browser's url.

/data-social-share-click/

    Package Sidebar

    Install

    npm i data-social-share-click

    Weekly Downloads

    1

    Version

    0.0.5

    License

    WTFPL

    Last publish

    Collaborators

    • davidmars