Minimalist Social Sharing jQuery Plugin - socialShare

Minimalist Social Sharing jQuery Plugin - socialShare
File Size: 5.86 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

A minimalist social sharing jQuery plugin to create plain social share links that open a new window to share your content on social networks: Facebook, Twitter, Linkedin, Google+ and Email.

It also gives a freedom to style your social share links to your needs.

How to use it:

1. Download and put the jquery.socialshare.js script after jQuery.

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" 
        integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" 
        crossorigin="anonymous"></script>
<script src="jquery.socialshare.js"></script>

2. Create the social share links using the following data attributes:

<a href="#" class="sshare" 
   data-sshare="twitter" 
   data-twitter-message="Message to share"
   data-url="https://www.jqueryscript.net">
   TWEET
</a>

<a href="#" class="sshare" 
   data-sshare="facebook" 
   data-url="https://www.jqueryscript.net">
   FACEBOOK
</a>

<a href="#" class="sshare" 
   data-sshare="linkedin" 
   data-url="https://www.jqueryscript.net" 
   data-linkedin-title="New Title" 
   data-linkedin-summary="This is my summary" 
   data-linkedin-source="Shaker Marketing Recruitment">
   LINKEDIN
</a>

<a href="#" class="sshare" 
   data-sshare="google+" 
   data-url="https://www.jqueryscript.net">
   GOOGLE PLUS
</a>

<a href="#" class="sshare" 
   data-sshare="email" 
   data-url="https://www.jqueryscript.net" 
   data-email-subject="Test" 
   data-email-body="This is a text email?!">
   EMAIL
</a>

3. Apply your own CSS styles to the social share links.

.sshare {
  /* your styles here */
}

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