jQuery Plugin To Make Your Site Content Tweetable - Tweetable

jQuery Plugin To Make Your Site Content Tweetable - Tweetable
File Size: 16.8 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Shareable Quote is a simple lightweight jQuery plugin that turns any part of your text into “Tweetable” quotes with a Twitter share icon. Useful for encouraging your visitors to spread your content through Twitter.

See also:

How to use it:

1. Load the shareable-quote.css stylesheet in the head section of the document.

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

2. Load Font Awesome 4 for twitter icons.

<link href="//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

3. Load the shareable-quote.js in the footer but after jQuery JavaScript library.

<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="js/shareable-quote.js"></script>

4. Wrap the text into an inline element using data-* attributes

<span class="demo" 
  data-text="Tweetable Quotes"
  data-tweet="Tweetable Quotes via @jqueryscript">
</span>

4. Call the plugin to highlight the text and make it Tweetable.

$( '.demo' ).tweetable();

Change log:

v1.5 (2014-12-11)

  • rename to Tweetable
  • Now the display text and tweet text are separate attributes.

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