Johan Kiviniemi’s series of tubes

extservice: A jQuery plugin

2009-02-22

I wrote a new jQuery plugin: extservice.

It allows you to add embedded items for external services to a webpage easily and with a consistent syntax.

Currently supported services:

  • Digg (the “digg it” button)
  • Disqus (the forum thread for your webpage)
  • Google Analytics (the tracking code)

It looks pretty much like this:

// Find the element with id=digg and replace its contents (if any) with the
// “digg it” button.
$('#digg').loadDigg ();

// Load Google Analytics.
$.loadGoogleAnalytics ('UA-0123456-1');

Download the plugin, or see it in use by viewing the source of this webpage or my Heroes page.

© 2011 Johan Kiviniemi

The image of a giraffe is from Wikimedia Commons