Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

Load Facebook like button on mouseover

Ads
banner
banner
banner
ivan Offline referral

Posts: 713
Joined: Jul 2013
Reputation: 6

#1
Senior Member
Hi I have just noticed letsforum.com added this Facebook like button that loads on mouseover. How can I add something similar to my website, of-course if you don't mind to tell me that.
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#2
Support Team
No problem! To add Facebook like button like I have added do this:

Add this code to where you want your like button to show
Code:
<div id="fblikediv"><img src="images/fb-like-button.png" id="fblikeimg" onMouseOver="return renderFbLike();"></div>

Make sure to point to you like image! Mine is in "images/fb-like-button.png"

Now add this JavaScript code, ideally after <body> tag
Code:
<script type="text/javascript">
    
    function renderFbLike() {
        var parent = document.getElementById('fblikediv');
        var child = document.getElementById('fblikeimg');
        parent.removeChild(child);
        
        var html2 = "Add your Facebook like button iFrame code here";
            document.getElementById('fblikediv').innerHTML = html2;
    }
</script>

Replace "Add your Facebook like button iFrame code here" with your iFrame code

This is it very easy and helps to increase your site's load time 001_thumbup
chod Offline referral

Posts: 860
Joined: Jul 2013
Reputation: 85

#3
Posting Freak
I get that adding in the iframe, may increase load time, but it should not be set in stone by any means. And you really should not see any difference in your site load speeds.

Where you trying to say decrease the load time? Cause increasing is bad Tongue

But regardless I do not see how adding the iframe will decrease your load time, actually I would bet a bunch of money it has nothing to do with the iframe from FB
www.AdminEmpire.com
www.BlimptonTech.com - Best Free Online JavaScript tool to minify JavaScript files.
maya Offline referral

Posts: 1,058
Joined: May 2013
Reputation: 34

#4
Posting Freak
Chod with iFrame or without you will still lose somewhere between 0.5 and 1 second in load time. The more social media buttons you add the longer your site will load!
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#5
Support Team
If you are wondering how can I make Facebook like buttons faster then refer to this link!
https://www.facebook.com/notes/facebook-...2164543920

You have to use Asynchronous JavaScript that doesn't interfere with your site code it load on the background thus decreasing site load time!





User(s) browsing this thread: 1 Guest(s)