超级玛丽式的digg按纽

by @stephenzhai on 2007-07-04 04:54:01

来自digg。国外网友Hart Woolery设计的超级玛丽的digg按纽,用户每顶一下,超级玛丽就顶一下。可以动态实时地显示dig状态和数量。

模板代码:

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

}

更多请看原链接。