STYLE SWITCHER

ContentShare

ContentShare is a jQuery plugin which lets you share the exact content on a page which you actually want to share. It enables you to share selected text on your social network rather the default text specified in thetags. By default, it supports Facebook and Twitter but you can add more networks easily.
Usage
  
 <html>
     <head>
          // css file for tooltip
          <link rel="stylesheet" type="text/css" href="tooltipster.min.css"/>
          // jquery library
          <script src="jquery-1.8.3.min.js"></script>
          // tooltip plugin
         <script type="text/javascript" src="jquery.tooltipster.min.js"></script>
         // our awesome ContentShare plugin
         <script src="contentshare.js"></script>
    </head>
</html>

ContentShare by default works on the text within ptags. So, if you are okay with this then you can skip this part. To customize, you can specify any element via CSS/jQuery Selectors and pass it while calling the plugin like:
// calling the plugin on DOM ready
$(document).ready(function(){
    $("p").contentshare();
    $.fn.contentshare.defaults.shareable.on('mouseup',function(){
        $.fn.contentshare.showTooltip();
    });            
});
Website

Recent Article

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Keep your skills sharp, get informed.

    Subscribe to our mailing list and get interesting stuff and updates to your email inbox