Skip to content

bjork24/TwitBook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TwitBook

Version 1.0

Author: Dan Chilton

Description

A jQuery plugin that allows you to insert Facebook likes, tweets, and Delicious bookmark counts anywhere within your markup. All in 77 glorious bytes!

Usage

This plugin can be used on any element, as long as the element satisfies these requirements:

  1. It has a class that gets instantiated by TwitBook()
  2. It has a data-tb-url attribute with the URL you want to check
  3. It has a data-tb-type attribute that specifies the network you'd like to use
  4. It has a child element with the class tb-count, where the number will appear

Example

On your page:

<div class="tb-link" data-tb-url="http://www.example.com" data-tb-type="facebook">
  Facebook (<span class="tb-count"></span>)
</div>

And then in your javascript:

$(document).ready(function(){
  $('.tb-link').TwitBook();
});

Types (data-tb-type)

  • Facebook - data-tb-type="facebook"
  • Twitter - data-tb-type="twitter"
  • Delicious - data-tb-type="delicious"

About

Simple jQuery plugin that allows you to place Facebook likes and Tweet counts anywhere within your markup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published