Why FB.XFBML.parse() doesnt render my plugin?

前端 未结 2 1628
走了就别回头了
走了就别回头了 2021-01-06 11:19

My code :

Render me
​ $(\'#render-me\').click
2条回答
  •  北海茫月
    2021-01-06 12:10

    You have to specify a node already in DOM. So, you can't use:

    FB.XFBML.parse(document.getElementById('button-facebook'));
    

    use instead:

    FB.XFBML.parse(document.getElementById('social-facebook'));
    

    and it will work fine ;)

提交回复
热议问题