Search code examples
internet-explorerfacebook-like

Second Facebook Like Button Not Rendering In IE


I'm loading two Facebook like buttons on the page and keeping one hidden.

Using the edge.create event I am showing the second like button after the first one appears. This works great in all browsers, except IE.

Take a look at it in action here: http://coolkidz.com/join

After you click "Like" (top right corner) a second like button should appear along with a message, inviting you to like the organization's fan page.

Any ideas what might be going on in IE?

Update

By the way, this did work earlier in the year. A relatively recent update on Facebook's end seems to have caused the trouble.


Solution

  • Actually, I’m not seeing the second like button in Firefox as well – because the <span> element around it and the iframe as well are set to width:0; height:0;

    Any ideas what might be going on in IE?

    It think it is problematic in IE to try to render XFBML elements that are currently hidden from the page. Try making the element visible first, and run FB.XFBML.parse on it explicitly afterwards.