Pretty jQuery Social Media Sharing Plugin - prettySocial
File Size: | 5.95 KB |
---|---|
Views Total: | 4037 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |
![Pretty jQuery Social Media Sharing Plugin - prettySocial](https://www.jqueryscript.net/images/Pretty-jQuery-Social-Media-Sharing-Plugin-prettySocial.jpg)
prettySocial is a very simple jQuery plugin that adds social media buttons on your web page to share custom content via data-*
attributes. Supports for Facebook, Twitter, Google plus and pinterest.
How to use it:
1. Add the jQuery javascript library and the jQuery prettySocial plugin to your document.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="jquery.prettySocial.min.js"></script>
2. Include the Font Awesome for the social media icons (OPTIONAL).
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.css" rel="stylesheet">
3. Create links for the social share buttons and specify the social network, content and URL you wish to share using Html5 data-*
attributes.
<div class="social-share"> <a href="#" data-type="twitter" data-url="https://www.jqueryscript.net" data-description="Free jQuery Plugins" data-via="jqueryscript" class="prettySocial fa fa-twitter"></a> <a href="#" data-type="facebook" data-url="https://www.jqueryscript.net" data-title="Free jQuery Plugins" data-description="Free jQuery Plugins" data-media="prettySocial.png" class="prettySocial fa fa-facebook"></a> <a href="#" data-type="googleplus" data-url="https://www.jqueryscript.net" data-description="Free jQuery Plugins" class="prettySocial fa fa-google-plus"></a> <a href="#" data-type="pinterest" data-url="https://www.jqueryscript.net" data-description="Free jQuery Plugins" data-media="prettySocial.png" class="prettySocial fa fa-pinterest"></a> </div>
4. Call the plugin and we're done.
$('.prettySocial').prettySocial();
This awesome jQuery plugin is developed by sonnyt. For more Advanced Usages, please check the demo page or visit the official website.