da-share
jQuery plugin for share buttons
HOW TO:
Easy Mode
Requirements:
Installation:
Paste
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
after
<head>
tag in your html page
Paste
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="https://danielkon.github.io/da-share/jquery.da-share.js"></script>
before
</body>
tag in your html page
Using:
Paste
<div class="da-share-html da-fb da-vk da-tw da-ok da-gp"></div>
as many copies of this code as you need on the html page.
Available social networks:
- Facebook —
da-fb
- VK (ВКонтакте) —
da-vk
- Twitter —
da-tw
- OK (Одноклассники) —
da-ok
- Pinterest —
da-pi
- Google Plus —
da-gp
Hard Mode
Advantages
You can customize the visual style of the buttons yourself
Requirements:
Installation:
Paste
<script src="https://danielkon.github.io/da-share/jquery.da-share.js"></script>
after
jquery.min.js
Using:
Add a call to the da_share
function on the onclick
event, for example:
<a href="#" onclick="da_share.fb();">Share</a>
<a href="#" onclick="da_share.tw();">Tweat</a>
Available social networks:
Social: | Call: | Optional parameters: |
---|---|---|
`onclick="da_share.fb();"` | url | |
VK (ВКонтакте) | `onclick="da_share.vk();"` | url, title, description, image |
`onclick="da_share.tw();"` | url, text, hashtags, via | |
OK (Одноклассники) | `onclick="da_share.ok();"` | url, title, image |
`onclick="da_share.pi();"` | url, description, image | |
Google Plus | `onclick="da_share.gp();"` | url |