Minimal jQuery Social Sharing Plugin - BEShare

Minimal jQuery Social Sharing Plugin - BEShare

BEShare is a jQuery plugin that provides a simple way to integrate social share links into your web page. Currently supports Facebook, Twitter, Google Plus and Linkedin.

How to use it:

1. Load the required stylesheet file in the head section of your document.

<link rel="stylesheet" href="./styles.css">

2. Load the jQuery BEShare plugin's script after jQuery library.

<script src="//"></script>
<script src="jQuery-BEShare.min.js"></script>

3. Create a 'popup' social share widget that displays a popup window containing social share links when you click on a toggle element.

  // CSS class to custom the popup
  'class': 'popup-share'

4. Create inline social share links with social icons on your web page.

  'type': 'inline',
  'targets': ['Facebook', 'Twitter', 'LinkedIn', 'GPlus', 'Print', 'Email'],
  'onShare': function(targetName) {
    ga('send', 'event', 'Social', 'Click', 'Share', targetName);

5. Default plugin options.

  // popup or inline
  'type': 'popup',
  // 'Facebook', 'Twitter', 'LinkedIn', 
  // 'GPlus', 'Print', 'Email'
  'targets': ['Facebook', 'Twitter'],
  // addional CSS class
  'class': PLUGIN_NAME,
  // CSS prefix & suffix 
  'prefix': 'icon-',
  'suffix': '',
  // width / height of the social share window
  'width': '626',
  'height': '436',
  // for twitter
  'via': '',
  // callback
  'onShare': null,
  'altLink': null

Change log:


  • Add aria-label attributes


  • Support using href as full share URL


  • Support `@via` in shared Tweet

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

  • Publication date: 08.03.2018
  • Source