Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- ...
- <iframe class="twitter-follow-button" allowtransparency="true" frameborder="0" scrolling="no"
- src="http://platform.twitter.com/widgets/follow_button.html?screen_name=YourUserNameHere"
- style="width:75px; height:20px;">
- </iframe>
- <script>
- 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)';
- //twitterFollowIframe.style.width = '110px';
- /*
- // cross domain restriction won't allow this
- twitterFollowIframe.onload = function() {
- twitterFollowIframe.contentWindow.scrollTo(20, 0);
- }
- */
- document.onmousemove = function(e){
- if ( !e ) e = window.event;
- twitterFollowIframe.style.left = e.clientX - 20;
- twitterFollowIframe.style.top = e.clientY - 10;
- }
- </script>
- ...
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement