Creating A Simple Social Share Bar with jQuery Stoopid Social Plugin

File Size: 68.8 KB
Views Total: 2977
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Creating A Simple Social Share Bar with jQuery Stoopid Social Plugin

Stoopid Social a simple jQuery plugin to create a social share bar for sharing your content on Facebook, Twitter, LinkedIn, Pintrest, and Google plus.

How to use it:

1. Create an empty element that will be served as a social share bar container.

<div class="share-bar"></div>

2. Load the jQuery library and the jQuery stoopid social plugin at the end of the web page.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="stoopidSocial.js"></script>

3. Call the plugin on the container element you just created and set the custom content you want to share.

$('.share-bar').stoopidSocial({ 
networks: ['facebook', 'twitter', 'pintrest', 'google', 'linkedin'], // The social networks to create share buttons
shareData: { // The data to share
title: 'jQuery Stoopid Social Plugin',
copy: 'Stoopid Social a simple jQuery plugin to create a social share bar for sharing your content on Facebook, Twitter, LinkedIn, Pintrest, and Google plus.',
image: '1.png',
url: 'https://www.jqueryscript.net'
},
facebookSDK: true, // Loads the Facebook JavaScript SDK
facebookAppID: 'FACEBOOK APP ID', // The Facebook App ID to use for the JavaScript SDK
twitterSDK: true, // Loads the Twitter SDK
injectStyles: true, // Inject styles for the share buttons
customNetwork: function (network, shareData) {}  // Callback function for custom share buttons
});

Change log:

2014-09-24

  • Stoopid Social can now be applied to the same element more than once

2014-08-06


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