Simple Pop Out Social Sharing Plugin With jQuery

File Size: 72.8 KB
Views Total: 2978
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Simple Pop Out Social Sharing Plugin With jQuery

A really simple jQuery plugin used for creating a horizontal/vertical pop out social sharing widget to prompt your content in modern social networks: Facebook, Twitter, Google+, Pinterest, Whatsapp(Mobile only), Linkedin, Reddit, Email and Print.

How to use it:

1. To get started, you first need to load the jQuery Social Media Sharing plugin's JS and CSS files in the html document.

<script src="//code.jquery.com/jquery.min.js"></script>
<script src="simple_social_share.js"></script>
<link rel="stylesheet" href="simple_social_share.css">

2. Then create a DIV container to place the social share widget.

<div class="shareThis">
</div>

3. Finally, call the function on the DIV container to initialize the social share widget.

$("div.shareThis").simpleSocialShare();

4. Customize the social share widget by passing the following options as an object to the simpleSocialShare() function.

$("div.shareThis").simpleSocialShare({

  // url to share
  url: "",

  // title to share
  title: "",

  // page description
  description: "",

  // image to share
  image: "",

  // specify social networks
  // facebook, twitter, google, linkedin, pinterest, email, whatsapp, reddit
  sites: "",

  // horizontal or vertical button orientation
  orientation: "horizontal", 

  // button (shows a togglable share button)
  // none (shows nothing)
  // text (shows Share on: text before buttons)
  shareType: "text", 

  // only works with shareType of button
  // determines if the button should be clicked when created
  triggerButtonActiveState: false, 

  // only works with shareType of button
  // places the button on the left or right side of the social media icons
  buttonSide: "left", 

  // facebook developer app id
  // gives you more control over what you can customize when sharing on FB
  facebookAppId: "", 
  
});

Change log:

2016-08-05

  • The Facebook FB.ui function should only be used if an AppId is provided.

2016-07-02

  • Changed Spacing from User Additions and Updated Minified Source

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