From digg. Hart Woolery, a foreign netizen, designed the digg button of Super Mario. Every time a user pushes, Super Mario pushes. dig status and quantity can be displayed dynamically in real time.
Template code:
System.security.allowDomain(_parent._url)
function updateDiggs(story)
{
//this function is called roughly every 5 seconds
//story.diggs will give you the number of diggs.
//story.comments will give you the number of comments.
}
function resize(w,h)
{
//event to resize to the width and height of the widget if necessary
}
function setColor(color)
{
//event to change the color of anything if necessary
}
See the original link for more.