Pretty Nice Social Share Buttons - jQuery da-share

File Size: 15.6 KB
Views Total: 3517
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Pretty Nice Social Share Buttons  - jQuery da-share

The da-share jQuery plugin makes it simple to generate pretty nice social share buttons & links on your web applications.

Currently supports Facebook, Twitter, Google Plus, Pinterest, VK, and Odnoklassniki.

It also allows you to group a series of social share together on a single line using the Bootstrap 4's button group component.

How to use it:

1. Include the necessary Font Awesome Iconic Font in the head section of the webpage.

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css">

2. Include the Bootstrap 4's stylesheet for the button group (OPTIONAL).

<link rel="stylesheet" 
      href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" 
      integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" 
      crossorigin="anonymous">

3. Include jQuery library and the jQuery da-share plugin's script at the bottom of the webpage.

<script src="https://code.jquery.com/jquery-3.3.1.min.js" 
        integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT" 
        crossorigin="anonymous"></script>
<script src="jquery.da-share.js"></script>

4. Create a series of social share buttons in a single DIV and specify the social networks you want to display using the following CSS classes.

  • da-share-html: Required
  • da-fb: Facebook
  • da-vk: VK
  • da-tw: Twitter
  • da-ok: OK.Ru
  • da-gp: Google Plus
  • da-pi: Pinterest
<div class="da-share-html da-fb da-vk da-tw da-pi da-ok da-gp"></div>

5. Sometimes you might only need to display social share links on the webpage:

<a href="#" onclick="da_share.fb();">Share on Facebook</a> |
<a href="#" onclick="da_share.tw();">Tweat This</a> |
<a href="#" onclick="da_share.gp();">Share on Google Plus</a>

Changelog:

2018-12-14

  • added pinterest.

2018-12-14

  • Update jquery.da-share.js

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