Just hide the container using CSS and then display it after loading the iframe, there are two ways to do this:
<style>#fblike { visibility:hidden; }</style> /* Hide container */ <script> FB.XFBML.parse(document, function(){ $('#fblike').css({'visibility':'visible'}); }); </script>
If you do not use this function FB.XFBML.parse (), you can subscribe to the event when everything is shown:
window.fbAsyncInit = function () { FB.init({ appId: 'APP_ID', xfbml: true }); FB.Event.subscribe('xfbml.render', function () { $('#fblike').css({'visibility':'visible'}); } ); };
Took me to find it all! Here is a link to where I found my solution: http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/
source share